Improve cmdline handling
This commit is contained in:
@@ -30,6 +30,7 @@ misc.set(_G, { 'cmp', 'plugin', 'cmdline', 'enter' }, function()
|
|||||||
end
|
end
|
||||||
local cmdtype = vim.fn.expand('<afile>')
|
local cmdtype = vim.fn.expand('<afile>')
|
||||||
if cmdtype ~= '=' then
|
if cmdtype ~= '=' then
|
||||||
|
if api.is_cmdline_mode() then
|
||||||
vim.cmd [[
|
vim.cmd [[
|
||||||
augroup cmp-cmdline
|
augroup cmp-cmdline
|
||||||
autocmd!
|
autocmd!
|
||||||
@@ -38,6 +39,7 @@ misc.set(_G, { 'cmp', 'plugin', 'cmdline', 'enter' }, function()
|
|||||||
]]
|
]]
|
||||||
require('cmp.utils.autocmd').emit('InsertEnter')
|
require('cmp.utils.autocmd').emit('InsertEnter')
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
misc.set(_G, { 'cmp', 'plugin', 'cmdline', 'leave' }, function()
|
misc.set(_G, { 'cmp', 'plugin', 'cmdline', 'leave' }, function()
|
||||||
|
|||||||
Reference in New Issue
Block a user