Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit 17c9cdb

Browse files
committed
Keep together with applyAdditionalTextEdits
1 parent 779e0dd commit 17c9cdb

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

lua/completion.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,13 @@ local function hasConfirmedCompletion()
9797
local completed_item = api.nvim_get_vvar('completed_item')
9898
if completed_item.user_data.lsp ~= nil then
9999
applyAddtionalTextEdits(completed_item)
100+
if vim.g.completion_enable_snippet == "snippets.nvim" then
101+
require 'snippets'.expand_at_cursor(completed_item.user_data.actual_item, completed_item.word)
102+
end
100103
end
101104
if opt.get_option('enable_auto_paren') == 1 then
102105
autoAddParens(completed_item)
103106
end
104-
if completed_item.user_data.lsp ~= nil
105-
and vim.g.completion_enable_snippet == "snippets.nvim" then
106-
require 'snippets'.expand_at_cursor(completed_item.user_data.actual_item, completed_item.word)
107-
end
108107
if completed_item.kind == 'UltiSnips' then
109108
api.nvim_call_function('UltiSnips#ExpandSnippet', {})
110109
elseif completed_item.kind == 'Neosnippet' then

0 commit comments

Comments
 (0)