neovim: luasnip takes precedence over cmp

This commit is contained in:
2024-03-09 00:18:36 +03:00
parent 60e7f695ec
commit 759c0ae02b

View File

@@ -39,17 +39,17 @@ cmp.setup({
},
mapping = {
["<C-j>"] = cmp.mapping(function()
if cmp.visible() then
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
else
if ls.jumpable(1) then
ls.jump(1)
else
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
end
end),
["<C-k>"] = cmp.mapping(function()
if cmp.visible() then
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select })
else
if ls.jumpable(-1) then
ls.jump(-1)
else
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select })
end
end),
["<C-space>"] = cmp.mapping(function()