diff --git a/lua/plugins/configs/cmp.lua b/lua/plugins/configs/cmp.lua index 045a9d9..e928e54 100644 --- a/lua/plugins/configs/cmp.lua +++ b/lua/plugins/configs/cmp.lua @@ -44,7 +44,7 @@ cmp.setup { }, [""] = function(fallback) if cmp.visible() then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("", true, true, true), "n") + cmp.select_next_item() elseif require("luasnip").expand_or_jumpable() then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") else @@ -52,9 +52,9 @@ cmp.setup { end end, [""] = function(fallback) - if cmp.visible() then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("", true, true, true), "n") - elseif require("luasnip").jumpable(-1) then + if cmp.visible() then + cmp.select_next_item() + elseif require("luasnip").jumpable(-1) then vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") else fallback()