]> Sergey Matveev's repositories - vim-lsp.git/blobdiff - autoload/lsp/lsp.vim
Move the code for displaying the current diag in the status line to diag.vim
[vim-lsp.git] / autoload / lsp / lsp.vim
index 7cf25ac2b5d2172d21fed769c24a6374afae8ed8..77544ff1fabd588a7a9c0cccd0665a5142947104 100644 (file)
@@ -387,14 +387,6 @@ def AddBufLocalAutocmds(lspserver: dict<any>, bnr: number): void
                cmd: $'call LspDocHighlightClear({bnr}) | call LspDocHighlight({bnr}, "silent")'})
   endif
 
-  # Show diagnostics on the status line
-  if opt.lspOptions.showDiagOnStatusLine
-    acmds->add({bufnr: bnr,
-               event: 'CursorMoved',
-               group: 'LSPBufferAutocmds',
-               cmd: 'LspShowCurrentDiagInStatusLine()'})
-  endif
-
   autocmd_add(acmds)
 enddef
 
@@ -758,16 +750,6 @@ export def LspShowCurrentDiag(atPos: bool)
   diag.ShowCurrentDiag(atPos)
 enddef
 
-# Display the diagnostics for the current line in the status line.
-export def LspShowCurrentDiagInStatusLine()
-  var fname: string = @%
-  if fname->empty()
-    return
-  endif
-
-  diag.ShowCurrentDiagInStatusLine()
-enddef
-
 # get the count of diagnostics in the current buffer
 export def ErrorCount(): dict<number>
   var res = {Error: 0, Warn: 0, Info: 0, Hint: 0}