From d7cee00c97c65bfc86399461a677929748b3a844 Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Sun, 14 Nov 2021 21:23:03 -0800 Subject: [PATCH] Use symbol signature documentation field only if it is a string --- autoload/handlers.vim | 5 ++++- doc/lsp.txt | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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. -- 2.48.1