From: Girish Palya Date: Thu, 10 Aug 2023 17:26:34 +0000 (+0200) Subject: omnifunc documentation popup not throw error X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=5aa46599e923dd101e7cb8da07e39f2ff46498ce;p=vim-lsp.git omnifunc documentation popup not throw error When using Omni completion with other sources of completion items that do not have 'user_data' dictionary, documentation popup should not throw error. I am using my own completion plugin with g:LspOmniFunc and I need LSP to grab lazy-doc from lsp server. But it should not throw error when user_data does not contain dictionary. M autoload/lsp/completion.vim --- diff --git a/autoload/lsp/completion.vim b/autoload/lsp/completion.vim index bd6094a..3d1c2be 100644 --- a/autoload/lsp/completion.vim +++ b/autoload/lsp/completion.vim @@ -538,7 +538,7 @@ def LspResolve() var item = v:event.completed_item if item->has_key('user_data') && !item.user_data->empty() - if !item.user_data->has_key('documentation') + if item.user_data->type() == v:t_dict && !item.user_data->has_key('documentation') lspserver.resolveCompletion(item.user_data) else ShowCompletionDocumentation(item.user_data)