From: Girish Palya Date: Wed, 20 Dec 2023 13:08:01 +0000 (+0100) Subject: Remove E1013 error when lsp sends kind=null X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=056811729c0395298d936bdaa43d5ba212f79334;p=vim-lsp.git 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 --- 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)