: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
# 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
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
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*
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.
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>)
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
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('.')])
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})