simplify confirm keybind nvim cmp
This commit is contained in:
@ -108,12 +108,7 @@ return { 'hrsh7th/nvim-cmp',
|
||||
-- mappings
|
||||
mapping = cmp.mapping.preset.insert {
|
||||
["<C-y>"] = cmp.mapping(function()
|
||||
if cmp.get_active_entry() then
|
||||
cmp.confirm({ select = true })
|
||||
elseif cmp.visible() and not cmp.get_active_entry() then
|
||||
cmp.select_next_item()
|
||||
cmp.confirm({ select = true })
|
||||
end
|
||||
cmp.confirm({ select = true })
|
||||
end, { "i", "c" }),
|
||||
|
||||
["<C-n>"] = cmp.mapping(function()
|
||||
|
Reference in New Issue
Block a user