]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Silence the messages when loading new buffers
authorYegappan Lakshmanan <yegappan@yahoo.com>
Sun, 18 Jun 2023 14:26:50 +0000 (07:26 -0700)
committerYegappan Lakshmanan <yegappan@yahoo.com>
Sun, 18 Jun 2023 14:26:50 +0000 (07:26 -0700)
autoload/lsp/diag.vim
autoload/lsp/offset.vim
autoload/lsp/symbol.vim
autoload/lsp/textedit.vim
autoload/lsp/util.vim

index 7b6f8280fa49d24f3c728bc138c3a32e9bac96b9..30b1b7d095dda5364b12446afa85b46a444852b3 100644 (file)
@@ -163,7 +163,7 @@ enddef
 # Refresh the placed diagnostics in buffer "bnr"
 # This inline signs, inline props, and virtual text diagnostics
 def DiagsRefresh(bnr: number)
-  bnr->bufload()
+  :silent! bnr->bufload()
 
   RemoveDiagVisualsForBuffer(bnr)
 
index b6bbe38eee8861a87b508d1d8cbd0f518ba278b0..699964e536c799ab64a7414d08d55f18c4a6627f 100644 (file)
@@ -19,9 +19,9 @@ export def EncodePosition(lspserver: dict<any>, bnr: number, pos: dict<number>)
       return
     endif
 
-    bnr->bufload()
+    :silent! bnr->bufload()
     var text = bnr->getbufline(pos.line + 1)->get(0, '')
-    if text == ''
+    if text->empty()
       return
     endif
 
@@ -45,10 +45,10 @@ export def DecodePosition(lspserver: dict<any>, bnr: number, pos: dict<number>)
       return
     endif
 
-    bnr->bufload()
+    :silent! bnr->bufload()
     var text = bnr->getbufline(pos.line + 1)->get(0, '')
     # If the line is empty then don't decode the character position.
-    if text == ''
+    if text->empty()
       return
     endif
 
index 081af96e34b29a8949485d66941bc33a6305c019..b26057cd575fef7504a3ffd846fcdbbf627b0214 100644 (file)
@@ -352,7 +352,7 @@ def PeekLocations(lspserver: dict<any>, locations: list<dict<any>>,
     if bnr == -1
       bnr = fname->bufadd()
     endif
-    bnr->bufload()
+    :silent! bnr->bufload()
 
     var lnum = range.start.line + 1
     var text: string = bnr->getbufline(lnum)->get(0, '')
@@ -394,7 +394,7 @@ export def ShowLocations(lspserver: dict<any>, locations: list<dict<any>>,
     if bnr == -1
       bnr = fname->bufadd()
     endif
-    bnr->bufload()
+    :silent! bnr->bufload()
     var text: string = bnr->getbufline(range.start.line + 1)->get(0, '')->trim("\t ", 1)
     qflist->add({filename: fname,
                        lnum: range.start.line + 1,
@@ -441,7 +441,7 @@ def PeekSymbolLocation(lspserver: dict<any>, location: dict<any>)
     # Failed to create or find a buffer
     return
   endif
-  silent! bnum->bufload()
+  :silent! bnum->bufload()
 
   if lspserver.peekSymbolPopup->winbufnr() != -1
     # If the symbol popup window is already present, close it.
index 00c01727bf39ed3015fbd3600547c5798bf5a689..5c11408f1e604dfd659578228414a4ebba763413 100644 (file)
@@ -104,7 +104,7 @@ export def ApplyTextEdits(bnr: number, text_edits: list<dict<any>>): void
   endif
 
   # if the buffer is not loaded, load it and make it a listed buffer
-  bnr->bufload()
+  :silent! bnr->bufload()
   setbufvar(bnr, '&buflisted', true)
 
   var start_line: number = 4294967295          # 2 ^ 32
index 023c83553e85d471bfb8b45048c5c9b92fb613ae..c7b0d794f121b57643273ce9b119638a023b8e9f 100644 (file)
@@ -167,7 +167,7 @@ export def GetLineByteFromPos(bnr: number, pos: dict<number>): number
   endif
 
   # Need a loaded buffer to read the line and compute the offset
-  bnr->bufload()
+  :silent! bnr->bufload()
 
   var ltext: string = bnr->getbufline(pos.line + 1)->get(0, '')
   if ltext->empty()
@@ -194,7 +194,7 @@ export def GetCharIdxWithoutCompChar(bnr: number, pos: dict<number>): number
   endif
 
   # Need a loaded buffer to read the line and compute the offset
-  bnr->bufload()
+  :silent! bnr->bufload()
 
   var ltext: string = bnr->getbufline(pos.line + 1)->get(0, '')
   if ltext->empty()