From: Oleksiy Hryshchenko Date: Sun, 2 Apr 2023 18:16:18 +0000 (+0300) Subject: up X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=198e2658ac31aa8e8ef247551ef51217798fb256;p=vim-lsp.git up --- diff --git a/autoload/lsp/completion.vim b/autoload/lsp/completion.vim index 02f2ed5..725d07e 100644 --- a/autoload/lsp/completion.vim +++ b/autoload/lsp/completion.vim @@ -88,6 +88,20 @@ export def CompletionReply(lspserver: dict, cItems: any) lspserver.completeItemsIsIncomplete = cItems.isIncomplete endif + var ultisniplist = UltiSnips#SnippetsInCurrentScope() + + for [key, info] in items(ultisniplist) + echom key + items->add({ + label: key, + data: { + entryNames: [key], + }, + kind: 15, + info: info, + }) + endfor + # Get the keyword prefix before the current cursor column. var chcol = charcol('.') var starttext = chcol == 1 ? '' : getline('.')[ : chcol - 2] @@ -190,6 +204,10 @@ export def CompletionReply(lspserver: dict, cItems: any) endif endif + if item->has_key('info') + d.menu = item.info + endif + d.user_data = item completeItems->add(d) endfor