]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Rename the LspDiagThis command to LspDiagHere
authorYegappan Lakshmanan <yegappan@yahoo.com>
Fri, 24 Mar 2023 14:27:06 +0000 (07:27 -0700)
committerYegappan Lakshmanan <yegappan@yahoo.com>
Fri, 24 Mar 2023 14:27:06 +0000 (07:27 -0700)
README.md
autoload/lsp/diag.vim
doc/lsp.txt
plugin/lsp.vim
test/clangd_tests.vim
test/tsserver_tests.vim

index 29e9f033e3e5a9b71f3d463427bb3832324ac73b..dd918d06e532b62b62cc9cc91e918ce9756c73b0 100644 (file)
--- a/README.md
+++ b/README.md
@@ -154,7 +154,7 @@ Command|Description
 :LspDiagNext|Jump to the next diagnostic message after the current position
 :LspDiagPrev|Jump to the previous diagnostic message before the current position
 :LspDiagShow|Display the diagnostics messages from the language server for the current buffer in a new location list.
-:LspDiagThis|Jump to the current diagnostic message in the current line
+:LspDiagHere|Jump to the current diagnostic message in the current line
 :LspFold|Fold the current file
 :LspFormat|Format a range of lines in the current file using the language server. The **shiftwidth** and **expandtab** values set for the current buffer are used when format is applied.  The default range is the entire file.
 :LspGotoDeclaration|Go to the declaration of the keyword under cursor
index 559217ce6c8badca36a448ae1f5c373b240b944e..7c251ca5e829fa3196b3aa1abd308cf0ee027166 100644 (file)
@@ -350,12 +350,12 @@ export def LspDiagsJump(lspserver: dict<any>, which: string): void
   # Find the entry just before the current line (binary search)
   var curlnum: number = line('.')
   var curcol: number = charcol('.')
-  for diag in (which == 'next' || which == 'this') ? diags : diags->copy()->reverse()
+  for diag in (which == 'next' || which == 'here') ? diags : diags->copy()->reverse()
     var lnum = diag.range.start.line + 1
     var col = diag.range.start.character + 1
     if (which == 'next' && (lnum > curlnum || lnum == curlnum && col > curcol))
          || (which == 'prev' && (lnum < curlnum || lnum == curlnum && col < curcol))
-         || (which == 'this' && (lnum == curlnum && col > curcol))
+         || (which == 'here' && (lnum == curlnum && col > curcol))
       setcursorcharpos(lnum, col)
       return
     endif
index 727e0952056e4213c24157d36126c5e0b16dc09e..93f2b389690159bfa5e2025f7583a2ed9ae56e8b 100644 (file)
@@ -84,7 +84,7 @@ The following commands are provided:
                        buffer before the current current position.
 :LspDiagShow           Display the diagnostics messages from the language
                        server for the current buffer in a location list.
-:LspDiagThis           Jump to the current diagnostic message for the current
+:LspDiagHere           Jump to the current diagnostic message for the current
                        buffer in the current line (start from current column).
 :LspFold               Fold the current file
 :LspFormat             Format a range of lines in the current file using the
@@ -403,8 +403,8 @@ can map these commands to keys and make it easier to invoke them.
                        can use the Vim location list commands to browse the
                        list.
 
-                                               *:LspDiagThis*
-:LspDiagThis           Jumps to the location of the diagnostic message in
+                                               *:LspDiagHere*
+:LspDiagHere           Jumps to the location of the diagnostic message in
                        the current line (start from current column).
 
                                                *:LspFold*
@@ -786,7 +786,7 @@ the current file in a |location-list-window|.  You can use the |:LspDiagFirst|
 command to jump to the line with the first diagnostic message, the
 |:LspDiagNext| command to jump to the next nearest line with the diagnostic
 message, the |:LspDiagPrev| command to jump to the previous nearest line with
-the diagnostic message, the |:LspDiagThis| command to jump to the diagnostic
+the diagnostic message, the |:LspDiagHere| command to jump to the diagnostic
 message in the current line.  You can use the |:LspDiagCurrent| command to
 display the entire diagnostic message from the language server for the current
 line.
index 0329114070efbfc5c24af681cafc0093001f4585..51e9f8b25e9e206261fc7955418c55e93c17665f 100644 (file)
@@ -85,7 +85,7 @@ command! -nargs=0 -bar LspDiagHighlightEnable lsp.DiagHighlightEnable()
 command! -nargs=0 -bar LspDiagNext lsp.JumpToDiag('next')
 command! -nargs=0 -bar LspDiagPrev lsp.JumpToDiag('prev')
 command! -nargs=0 -bar LspDiagShow lsp.ShowDiagnostics()
-command! -nargs=0 -bar LspDiagThis lsp.JumpToDiag('this')
+command! -nargs=0 -bar LspDiagHere lsp.JumpToDiag('here')
 command! -nargs=0 -bar LspFold lsp.FoldDocument()
 command! -nargs=0 -bar -range=% LspFormat lsp.TextDocFormat(<range>, <line1>, <line2>)
 command! -nargs=0 -bar LspGotoDeclaration lsp.GotoDeclaration(v:false, <q-mods>)
@@ -150,7 +150,7 @@ if has('gui_running')
   anoremenu <silent> L&sp.Diagnostics.First :LspDiagFirst<CR>
   anoremenu <silent> L&sp.Diagnostics.Next :LspDiagNext<CR>
   anoremenu <silent> L&sp.Diagnostics.Prev :LspDiagPrev<CR>
-  anoremenu <silent> L&sp.Diagnostics.This :LspDiagThis<CR>
+  anoremenu <silent> L&sp.Diagnostics.This :LspDiagHere<CR>
 
   if &mousemodel =~ 'popup'
     anoremenu <silent> PopUp.L&sp.Go\ to\ Definition
index a817cb07bf234b0f29a4b0c40e7bb4580f7751f3..3bac2ff923c629f1d4e1f85d7271df86724bad84 100644 (file)
@@ -248,7 +248,7 @@ def g:Test_LspDiag()
   output = execute('LspDiagCurrent')->split("\n")
   assert_equal("Expected ';' at end of declaration (fix available)", output[0])
   :normal! 0
-  :LspDiagThis
+  :LspDiagHere
   assert_equal([3, 14], [line('.'), col('.')])
   :LspDiagNext
   assert_equal([5, 2], [line('.'), col('.')])
index 9ba8bcbbc87e1d41f560ae819415613f649a8a59..ee766191f252a4246a7115d2e7da2d468abf9615 100644 (file)
@@ -60,9 +60,9 @@ def g:Test_LspDiag()
   assert_equal([1, 10], [line('.'), col('.')])
 
   :normal! 0
-  :LspDiagThis
+  :LspDiagHere
   assert_equal([1, 3], [line('.'), col('.')])
-  :LspDiagThis
+  :LspDiagHere
   assert_equal([1, 10], [line('.'), col('.')])
 
   g:LspOptionsSet({showDiagInPopup: false})