From 8dddc70a6c113418d295cc319ed10644dd0570ae Mon Sep 17 00:00:00 2001 From: cy Date: Fri, 10 Jan 2025 21:43:17 -0500 Subject: [PATCH] nvim: dont jump --- home/nvim/lua/config/nvim-cmp.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/home/nvim/lua/config/nvim-cmp.lua b/home/nvim/lua/config/nvim-cmp.lua index 8cfdedb..de42470 100644 --- a/home/nvim/lua/config/nvim-cmp.lua +++ b/home/nvim/lua/config/nvim-cmp.lua @@ -25,20 +25,20 @@ cmp.setup({ end), [""] = cmp.mapping(function(fallback) - if luasnip.locally_jumpable(1) then - luasnip.jump(1) - elseif cmp.visible() then + if cmp.visible() then cmp.select_next_item() + elseif luasnip.locally_jumpable(1) then + luasnip.jump(1) else fallback() end end, { "i", "s" }), [""] = cmp.mapping(function(fallback) - if luasnip.locally_jumpable(-1) then - luasnip.jump(-1) - elseif cmp.visible() then + if cmp.visible() then cmp.select_prev_item() + elseif luasnip.locally_jumpable(-1) then + luasnip.jump(-1) else fallback() end