diff --git a/lua/modules/configs/completion/cmp.lua b/lua/modules/configs/completion/cmp.lua index d9676a107..f20e7b60d 100644 --- a/lua/modules/configs/completion/cmp.lua +++ b/lua/modules/configs/completion/cmp.lua @@ -127,14 +127,14 @@ return function() }, -- You can set mappings if you want mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.select_prev_item(), - [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }), + [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }), [""] = cmp.mapping.scroll_docs(-4), [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.close(), + [""] = cmp.mapping.abort(), [""] = cmp.mapping(function(fallback) if cmp.visible() then - cmp.select_next_item() + cmp.select_next_item({ behavior = cmp.SelectBehavior.Select }) elseif require("luasnip").expand_or_locally_jumpable() then require("luasnip").expand_or_jump() else @@ -143,7 +143,7 @@ return function() end, { "i", "s" }), [""] = cmp.mapping(function(fallback) if cmp.visible() then - cmp.select_prev_item() + cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select }) elseif require("luasnip").jumpable(-1) then require("luasnip").jump(-1) else