neovim: update completion remaps
This commit is contained in:
@@ -10,18 +10,32 @@ cmp.setup({
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
mapping = {
|
mapping = {
|
||||||
["<C-j>"] = cmp.mapping(function()
|
["<C-u>"] = cmp.mapping(function(fallback)
|
||||||
|
if ls.jumpable(1) then
|
||||||
|
ls.jump(1)
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
["<C-i>"] = cmp.mapping(function(fallback)
|
||||||
|
if ls.jumpable(-1) then
|
||||||
|
ls.jump(-1)
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
["<C-j>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
|
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
|
||||||
else
|
else
|
||||||
ls.jump(1)
|
fallback()
|
||||||
end
|
end
|
||||||
end),
|
end),
|
||||||
["<C-k>"] = cmp.mapping(function()
|
["<C-k>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select })
|
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select })
|
||||||
else
|
else
|
||||||
ls.jump(-1)
|
fallback()
|
||||||
end
|
end
|
||||||
end),
|
end),
|
||||||
["<C-space>"] = cmp.mapping(function()
|
["<C-space>"] = cmp.mapping(function()
|
||||||
|
|||||||
Reference in New Issue
Block a user