From f061e881d00162bb98a012a249cbafb2d88cdd6e Mon Sep 17 00:00:00 2001 From: Daniil Tsivinsky Date: Sat, 9 Mar 2024 14:07:56 +0300 Subject: [PATCH] Revert "luasnip takes precedence over cmp" Revert "neovim: fix luasnip jumps & cmp select remaps" This reverts commit f52d4df56d2b726316492226b160bf61e7357121. Revert "neovim: luasnip takes precedence over cmp" This reverts commit 759c0ae02b94ae6a7d7802b1c9b015a57fea2a48. --- neovim/.config/nvim/after/plugin/comp.lua | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/neovim/.config/nvim/after/plugin/comp.lua b/neovim/.config/nvim/after/plugin/comp.lua index 50cd8ae..953c276 100644 --- a/neovim/.config/nvim/after/plugin/comp.lua +++ b/neovim/.config/nvim/after/plugin/comp.lua @@ -38,22 +38,18 @@ cmp.setup({ end, }, mapping = { - [""] = cmp.mapping(function(fallback) - if ls.jumpable(1) then - ls.jump(1) - elseif cmp.visible() then + [""] = cmp.mapping(function() + if cmp.visible() then cmp.select_next_item({ behavior = cmp.SelectBehavior.Select }) else - fallback() + ls.jump(1) end end), - [""] = cmp.mapping(function(fallback) - if ls.jumpable(-1) then - ls.jump(-1) - elseif cmp.visible() then + [""] = cmp.mapping(function() + if cmp.visible() then cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select }) else - fallback() + ls.jump(-1) end end), [""] = cmp.mapping(function()