nvim: dont jump

This commit is contained in:
cy 2025-01-10 21:43:17 -05:00
parent bb44d07ce9
commit 8dddc70a6c

View file

@ -25,20 +25,20 @@ cmp.setup({
end), end),
["<C-n>"] = cmp.mapping(function(fallback) ["<C-n>"] = cmp.mapping(function(fallback)
if luasnip.locally_jumpable(1) then if cmp.visible() then
luasnip.jump(1)
elseif cmp.visible() then
cmp.select_next_item() cmp.select_next_item()
elseif luasnip.locally_jumpable(1) then
luasnip.jump(1)
else else
fallback() fallback()
end end
end, { "i", "s" }), end, { "i", "s" }),
["<C-p>"] = cmp.mapping(function(fallback) ["<C-p>"] = cmp.mapping(function(fallback)
if luasnip.locally_jumpable(-1) then if cmp.visible() then
luasnip.jump(-1)
elseif cmp.visible() then
cmp.select_prev_item() cmp.select_prev_item()
elseif luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
else else
fallback() fallback()
end end