autoload/lsp/completion.vim | 11 ++++------- diff --git a/autoload/lsp/completion.vim b/autoload/lsp/completion.vim index 2928d65260fffeb84e5cd0f8e32c970084b9d8e6..bbc318dc8a43c7220fe14f16b2064a4a1b87e16d 100644 --- a/autoload/lsp/completion.vim +++ b/autoload/lsp/completion.vim @@ -104,13 +104,11 @@ var start_col = start_idx + 1 if opt.lspOptions.ultisnipsSupport call UltiSnips#SnippetsInCurrentScope(1) - for [key, info] in items(g:current_ulti_dict_info) - if matchfuzzy([key], prefix)->empty() - continue - endif - var parts = split(info.location, ':') + for key in matchfuzzy(g:current_ulti_dict_info->keys(), prefix) + var item = g:current_ulti_dict_info[key] + var parts = split(item.location, ':') var txt = readfile(parts[0])[str2nr(parts[1]) : str2nr(parts[1]) + 20] - var restxt = info.description .. "\n\n" + var restxt = item.description .. "\n\n" for line in txt if line == "" break @@ -118,7 +116,6 @@ else restxt = restxt .. line .. "\n" endif endfor - #echom restxt items->add({ label: key, data: {