feat(cmp): better c-n and c-p mapping fallback. Fixes #4414

This commit is contained in:
Folke Lemaitre
2024-09-18 08:20:01 +02:00
parent d67be9a9fb
commit 86d4f14bc8

View File

@ -33,6 +33,8 @@ return {
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-Space>"] = cmp.mapping.complete(),
["<CR>"] = LazyVim.cmp.confirm({ select = auto_select }),
["<C-y>"] = LazyVim.cmp.confirm({ select = true }),