]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Use symbol signature documentation field only if it is a string
authorYegappan Lakshmanan <yegappan@yahoo.com>
Mon, 15 Nov 2021 05:23:03 +0000 (21:23 -0800)
committerYegappan Lakshmanan <yegappan@yahoo.com>
Mon, 15 Nov 2021 05:23:03 +0000 (21:23 -0800)
autoload/handlers.vim
doc/lsp.txt

index 0c7834290a7d6dc28226eaa9d7b283c17c31ab6e..65c19887381ad9ab670c28f257d4aa994b9568c8 100644 (file)
@@ -132,7 +132,10 @@ def s:processSignaturehelpReply(lspserver: dict<any>, req: dict<any>, 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
index 6e60664c8fa10a7f1216287fbec38ce27501e355..f27fb57f6944f423c44f6d2ccc6b2f2e17e502f2 100644 (file)
@@ -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.