nvim: dont jump
This commit is contained in:
parent
bb44d07ce9
commit
8dddc70a6c
1 changed files with 6 additions and 6 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue