From: Oleksiy Hryshchenko Date: Thu, 6 Apr 2023 18:39:56 +0000 (+0300) Subject: change matchfuzzy use X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=addf39f49791ac446b4a06aabf83656c5f34b1ad;p=vim-lsp.git change matchfuzzy use --- diff --git a/autoload/lsp/completion.vim b/autoload/lsp/completion.vim index 2928d65..bbc318d 100644 --- a/autoload/lsp/completion.vim +++ b/autoload/lsp/completion.vim @@ -104,13 +104,11 @@ export def CompletionReply(lspserver: dict, cItems: any) 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 @@ export def CompletionReply(lspserver: dict, cItems: any) restxt = restxt .. line .. "\n" endif endfor - #echom restxt items->add({ label: key, data: {