From: Yegappan Lakshmanan Date: Mon, 15 Nov 2021 05:23:03 +0000 (-0800) Subject: Use symbol signature documentation field only if it is a string X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=d7cee00c97c65bfc86399461a677929748b3a844;p=vim-lsp.git Use symbol signature documentation field only if it is a string --- diff --git a/autoload/handlers.vim b/autoload/handlers.vim index 0c78342..65c1988 100644 --- a/autoload/handlers.vim +++ b/autoload/handlers.vim @@ -132,7 +132,10 @@ def s:processSignaturehelpReply(lspserver: dict, req: dict, reply: dic if params_len > 0 && result.activeParameter < params_len var label = '' if sig.parameters[result.activeParameter]->has_key('documentation') - label = sig.parameters[result.activeParameter].documentation + if sig.parameters[result.activeParameter].documentation->type() + == v:t_string + label = sig.parameters[result.activeParameter].documentation + endif else label = sig.parameters[result.activeParameter].label endif diff --git a/doc/lsp.txt b/doc/lsp.txt index 6e60664..f27fb57 100644 --- a/doc/lsp.txt +++ b/doc/lsp.txt @@ -243,14 +243,14 @@ diagnostic messages, you can add the following line to your .vimrc file: this, you can set the showSignature option to false in your .vimrc file: > - call lsp#setOptions({showSignature: v:false}) + call lsp#setOptions({'showSignature': v:false}) < Default is true. You can get the function signature echoed in cmdline rather than displayed in popup if you use > - call lsp#setOptions({echoSignature: v:true}) + call lsp#setOptions({'echoSignature': v:true}) < Default is false.