autoload/lsp/completion.vim | 18 ++++++++++++++++++ diff --git a/autoload/lsp/completion.vim b/autoload/lsp/completion.vim index 02f2ed5f5aae2f1edf55e073aa839d8bb4e8104c..725d07e355a39873e78baab09ec09f21ae827d92 100644 --- a/autoload/lsp/completion.vim +++ b/autoload/lsp/completion.vim @@ -88,6 +88,20 @@ items = cItems.items 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] @@ -188,6 +202,10 @@ && item.documentation.value->type() == v:t_string d.info = item.documentation.value endif endif + endif + + if item->has_key('info') + d.menu = item.info endif d.user_data = item