]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
disable auto showSignature
authorshane.xb.qian <shane.qian@foxmail.com>
Sun, 28 Feb 2021 17:23:44 +0000 (01:23 +0800)
committershane.xb.qian <shane.qian@foxmail.com>
Sun, 28 Feb 2021 17:23:44 +0000 (01:23 +0800)
- if g:LSP_Show_Signature is false

autoload/handlers.vim
autoload/lsp.vim
doc/lsp.txt
plugin/lsp.vim

index 923e2f3197441bd935264e50a542a45d34d525d1..409a6e668ecd68ca04013489383c72e537979b32 100644 (file)
@@ -25,7 +25,7 @@ def s:processInitializeReply(lspserver: dict<any>, req: dict<any>, reply: dict<a
   # and then setup the below mapping for those buffers.
 
   # map characters that trigger signature help
-  if caps->has_key('signatureHelpProvider')
+  if g:LSP_Show_Signature && caps->has_key('signatureHelpProvider')
     var triggers = caps.signatureHelpProvider.triggerCharacters
     for ch in triggers
       exe 'inoremap <buffer> <silent> ' .. ch .. ' ' .. ch .. "<C-R>=lsp#showSignature()<CR>"
index 62124ca332d124f52bb3a53e76c8b03103171e42..cf10b7e438d576f127730db971a74e6a110297aa 100644 (file)
@@ -306,7 +306,7 @@ def lsp#addFile(bnr: number): void
   exe 'autocmd InsertLeave <buffer=' .. bnr .. '> call lsp#leftInsertMode()'
 
   # map characters that trigger signature help
-  if lspserver.caps->has_key('signatureHelpProvider')
+  if g:LSP_Show_Signature && lspserver.caps->has_key('signatureHelpProvider')
     var triggers = lspserver.caps.signatureHelpProvider.triggerCharacters
     for ch in triggers
       exe 'inoremap <buffer> <silent> ' .. ch .. ' ' .. ch
index 121ee9588dfd9987df03b8c538261415281c3d75..674bf2bfc2cbf439f60f4349e4772a3fbd7c2de0 100644 (file)
@@ -210,10 +210,14 @@ accepts a list of LSP servers with the above information.
 
                                                *:LspShowSignature*
 :LspShowSignature      Displays the signature of the symbol (e.g. a function
-                       or method) before the cursor in a popup. The popup is
-                       also automatically displayed in insert mode after
-                       entering a symbol name followed by a separator (e.g. a
-                       opening parenthesis).
+                       or method) before the cursor in a popup.
+
+                       The popup is also automatically displayed in insert
+                       mode after entering a symbol name followed by a
+                       separator (e.g. a opening parenthesis). Unless if: >
+                       let g:LSP_Show_Signature = v:false
+<
+                       Default is true.
 
                                                *:LspDiagShow*
 :LspDiagShow           Creates a new location list with the diagnostics
index dbfd632e606c02236f2aa2ce7d62827d2406b6b1..4b6bb747c87e2178c5cf75e877ed39455965cb37 100644 (file)
@@ -11,6 +11,10 @@ if !exists('g:LSP_24x7_Complete')
   let g:LSP_24x7_Complete = v:true
 endif
 
+if !exists('g:LSP_Show_Signature')
+  let g:LSP_Show_Signature = v:true
+endif
+
 augroup LSPAutoCmds
   au!
   autocmd BufNewFile,BufReadPost *