autoload/handlers.vim | 2 +- autoload/lsp.vim | 2 +- doc/lsp.txt | 12 ++++++++---- plugin/lsp.vim | 4 ++++ diff --git a/autoload/handlers.vim b/autoload/handlers.vim index 923e2f3197441bd935264e50a542a45d34d525d1..409a6e668ecd68ca04013489383c72e537979b32 100644 --- a/autoload/handlers.vim +++ b/autoload/handlers.vim @@ -25,7 +25,7 @@ # TODO: Check all the buffers with filetype corresponding to this LSP server # 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 ' .. ch .. ' ' .. ch .. "=lsp#showSignature()" diff --git a/autoload/lsp.vim b/autoload/lsp.vim index 62124ca332d124f52bb3a53e76c8b03103171e42..cf10b7e438d576f127730db971a74e6a110297aa 100644 --- a/autoload/lsp.vim +++ b/autoload/lsp.vim @@ -306,7 +306,7 @@ setbufvar(bnr, '&balloonexpr', 'LspDiagExpr()') exe 'autocmd InsertLeave 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 ' .. ch .. ' ' .. ch diff --git a/doc/lsp.txt b/doc/lsp.txt index 121ee9588dfd9987df03b8c538261415281c3d75..674bf2bfc2cbf439f60f4349e4772a3fbd7c2de0 100644 --- a/doc/lsp.txt +++ b/doc/lsp.txt @@ -210,10 +210,14 @@ servers support this feature. *: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 diff --git a/plugin/lsp.vim b/plugin/lsp.vim index dbfd632e606c02236f2aa2ce7d62827d2406b6b1..4b6bb747c87e2178c5cf75e877ed39455965cb37 100644 --- a/plugin/lsp.vim +++ b/plugin/lsp.vim @@ -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 *