From a0053885ba2d50a62660731519aa5b6fef0859c6 Mon Sep 17 00:00:00 2001 From: hrsh7th Date: Tue, 9 Nov 2021 14:05:13 +0900 Subject: [PATCH] Use key sequence to avoid the invalid mode detection --- lua/cmp/init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/cmp/init.lua b/lua/cmp/init.lua index bd1056c..fad0500 100644 --- a/lua/cmp/init.lua +++ b/lua/cmp/init.lua @@ -271,8 +271,7 @@ cmp.setup = setmetatable({ }) autocmd.subscribe('InsertEnter', function() - --Avoid invalid mode detection on `InsertEnter` autocmd. - vim.schedule(function() + feedkeys.call('', '', function() if config.enabled() then cmp.core:prepare() cmp.core:on_change('InsertEnter')