simplify confirm keybind nvim cmp
This commit is contained in:
parent
b8d0882881
commit
82bd91d9de
1 changed files with 1 additions and 6 deletions
|
|
@ -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
|
||||
end, { "i", "c" }),
|
||||
|
||||
["<C-n>"] = cmp.mapping(function()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue