From 056811729c0395298d936bdaa43d5ba212f79334 Mon Sep 17 00:00:00 2001 From: Girish Palya Date: Wed, 20 Dec 2023 14:08:01 +0100 Subject: [PATCH] Remove E1013 error when lsp sends kind=null This is what pyslp sent: {'label': '''H''', 'data': {'doc_uri': 'file:///...py'}, 'sortText': 'a''H''', 'kind': null, 'insertText': '''H'''} 'kind' property need to be checked for null before attempting completion. M autoload/lsp/completion.vim --- autoload/lsp/completion.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/lsp/completion.vim b/autoload/lsp/completion.vim index ae0124e..170749e 100644 --- a/autoload/lsp/completion.vim +++ b/autoload/lsp/completion.vim @@ -263,7 +263,7 @@ export def CompletionReply(lspserver: dict, cItems: any) d.icase = 1 endif - if item->has_key('kind') + if item->has_key('kind') && !item.kind->empty() # namespace CompletionItemKind # map LSP kind to complete-item-kind d.kind = LspCompleteItemKindChar(item.kind) -- 2.48.1