This repository was archived by the owner on Oct 13, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,13 @@ local function applyAddtionalTextEdits(completed_item)
99
99
local item = completed_item .user_data .lsp .completion_item
100
100
-- vim-vsnip have better additional text edits...
101
101
if vim .fn .exists (' g:loaded_vsnip_integ' ) == 1 then
102
- api .nvim_call_function (' vsnip_integ#on_complete_done' , { completed_item })
102
+ api .nvim_call_function (' vsnip_integ#do_complete_done' , {
103
+ {
104
+ completed_item = completed_item ,
105
+ completion_item = item ,
106
+ apply_additional_text_edits = true
107
+ }
108
+ })
103
109
else
104
110
if item .additionalTextEdits then
105
111
local bufnr = api .nvim_get_current_buf ()
@@ -250,12 +256,6 @@ M.on_attach = function(option)
250
256
' "\\ <c-e>\\ <CR>" : "\\ <CR>"' ,
251
257
{silent = false , noremap = false , expr = true })
252
258
end
253
- -- overwrite vsnip_integ autocmd since we handle it on ourself in confirmCompletion
254
- if vim .fn .exists (" #vsnip_integ" ) then
255
- api .nvim_command (" augroup vsnip_integ" )
256
- api .nvim_command (" autocmd!" )
257
- api .nvim_command (" augroup end" )
258
- end
259
259
vim .b .completion_enable = 1
260
260
end
261
261
You can’t perform that action at this time.
0 commit comments