This commit is contained in:
hrsh7th
2021-11-03 03:16:45 +09:00
parent c67ed9d8bc
commit 2a58b8f926
3 changed files with 5 additions and 10 deletions

View File

@@ -270,13 +270,10 @@ cmp.setup = setmetatable({
})
autocmd.subscribe('InsertEnter', function()
-- Avoid unexpected mode detection (mode() function will returns `normal mode` on the InsertEnter event.)
vim.schedule(function()
if config.enabled() then
cmp.core:prepare()
cmp.core:on_change('InsertEnter')
end
end)
if config.enabled() then
cmp.core:prepare()
cmp.core:on_change('InsertEnter')
end
end)
autocmd.subscribe('TextChanged', function()