]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Support the inlay hints kind specified in the standard
authorYegappan Lakshmanan <yegappan@yahoo.com>
Sun, 27 Nov 2022 08:02:34 +0000 (00:02 -0800)
committerYegappan Lakshmanan <yegappan@yahoo.com>
Sun, 27 Nov 2022 08:02:34 +0000 (00:02 -0800)
autoload/lsp/inlayhints.vim

index e669ba8fb5752aee5d45cdfe490eff4ddebc8628..86350bbd4184ccac999777b127a35bcdf60f6b0a 100644 (file)
@@ -48,10 +48,11 @@ export def InlayHintsReply(lspserver: dict<any>, inlayHints: any)
       label = hint.label
     endif
 
-    if hint.kind ==# 'type'
+    var kind = hint.kind->string()
+    if kind ==# "'type'" || kind ==# '1'
       prop_add(hint.position.line + 1, hint.position.character + 1,
                {type: 'LspInlayHintsType', text: label, bufnr: bufnum})
-    elseif hint.kind ==# 'parameter'
+    elseif kind ==# "'parameter'" || kind ==# '2'
       prop_add(hint.position.line + 1, hint.position.character + 1,
                {type: 'LspInlayHintsParam', text: label, bufnr: bufnum})
     endif