This commit is contained in:
hrsh7th
2021-10-19 19:03:55 +09:00
parent 8d1af008b6
commit 8f92f57043

View File

@@ -80,13 +80,15 @@ vim.cmd [[command! CmpStatus lua require('cmp').status()]]
vim.cmd [[doautocmd <nomodeline> User cmp#ready]]
vim.on_key(function(keys)
if keys == vim.api.nvim_replace_termcodes('<C-c>', true, true, true) then
vim.schedule(function()
if not api.is_suitable_mode() then
require('cmp.utils.autocmd').emit('InsertLeave')
end
end)
end
end, vim.api.nvim_create_namespace('cmp.plugin'))
if vim.on_key then
vim.on_key(function(keys)
if keys == vim.api.nvim_replace_termcodes('<C-c>', true, true, true) then
vim.schedule(function()
if not api.is_suitable_mode() then
require('cmp.utils.autocmd').emit('InsertLeave')
end
end)
end
end, vim.api.nvim_create_namespace('cmp.plugin'))
end