]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
fix: inlayhints kind can be omitted
authorshane.xb.qian <shane.qian@foxmail.com>
Thu, 8 Dec 2022 07:44:27 +0000 (15:44 +0800)
committershane.xb.qian <shane.qian@foxmail.com>
Thu, 8 Dec 2022 07:44:27 +0000 (15:44 +0800)
autoload/lsp/inlayhints.vim

index 864ecb0d77abcd29739fdcd3edc2853655fcf82e..37107cd3f08c1e1d71c096b287c8fdd5dab0fa64 100644 (file)
@@ -48,7 +48,7 @@ export def InlayHintsReply(lspserver: dict<any>, inlayHints: any)
       label = hint.label
     endif
 
-    var kind = hint.kind->string()
+    var kind = hint->has_key('kind') ? hint.kind->string() : '1'
     if kind ==# "'type'" || kind ==# '1'
       prop_add(hint.position.line + 1, hint.position.character + 1,
                {type: 'LspInlayHintsType', text: label, bufnr: bufnum})