From: Yegappan Lakshmanan Date: Sun, 27 Nov 2022 08:02:34 +0000 (-0800) Subject: Support the inlay hints kind specified in the standard X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=2ba8fb75b60db5ab981a49dd9b06acddfe82f819;p=vim-lsp.git Support the inlay hints kind specified in the standard --- diff --git a/autoload/lsp/inlayhints.vim b/autoload/lsp/inlayhints.vim index e669ba8..86350bb 100644 --- a/autoload/lsp/inlayhints.vim +++ b/autoload/lsp/inlayhints.vim @@ -48,10 +48,11 @@ export def InlayHintsReply(lspserver: dict, 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