From 198e2658ac31aa8e8ef247551ef51217798fb256 Mon Sep 17 00:00:00 2001 From: Oleksiy Hryshchenko Date: Sun, 2 Apr 2023 21:16:18 +0300 Subject: [PATCH] up --- autoload/lsp/completion.vim | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 -- 2.48.1