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()
137
137
elseif completed_item .user_data .snippet_source == ' Neosnippet' then
138
138
api .nvim_input (" <c-r>" .. " =neosnippet#expand('" .. completed_item .word .. " ')" .. " <CR>" )
139
139
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
+ })
141
146
elseif completed_item .user_data .snippet_source == ' snippets.nvim' then
142
147
require ' snippets' .expand_at_cursor ()
143
148
end
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ M.getVsnipItems = function(prefix)
69
69
for _ , source in pairs (snippetsList ) do
70
70
for _ , snippet in pairs (source ) do
71
71
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 }
73
73
local item = {}
74
74
item .word = word
75
75
item .kind = kind
You can’t perform that action at this time.
0 commit comments