This repository was archived by the owner on Oct 13, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,12 @@ local function hasConfirmedCompletion()
137137 elseif completed_item .user_data .snippet_source == ' Neosnippet' then
138138 api .nvim_input (" <c-r>" .. " =neosnippet#expand('" .. completed_item .word .. " ')" .. " <CR>" )
139139 elseif completed_item .user_data .snippet_source == ' vim-vsnip' then
140- api .nvim_call_function (' vsnip#expand' , {})
140+ api .nvim_call_function (' vsnip#anonymous' , {
141+ table.concat (completed_item .user_data .snippet_body , " \n " ),
142+ {
143+ prefix = completed_item .word
144+ }
145+ })
141146 elseif completed_item .user_data .snippet_source == ' snippets.nvim' then
142147 require ' snippets' .expand_at_cursor ()
143148 end
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ M.getVsnipItems = function(prefix)
6969 for _ , source in pairs (snippetsList ) do
7070 for _ , snippet in pairs (source ) do
7171 for _ , word in pairs (snippet .prefix ) do
72- local user_data = {snippet_source = ' vim-vsnip' , hover = snippet .description }
72+ local user_data = {snippet_source = ' vim-vsnip' , snippet_body = snippet . body , hover = snippet .description }
7373 local item = {}
7474 item .word = word
7575 item .kind = kind
You can’t perform that action at this time.
0 commit comments