neovim: update completion bindings
This commit is contained in:
@@ -10,18 +10,18 @@ cmp.setup({
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
mapping = {
|
mapping = {
|
||||||
["<C-j>"] = cmp.mapping(function(fallback)
|
["<C-j>"] = cmp.mapping(function()
|
||||||
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
|
||||||
fallback()
|
ls.jump(1)
|
||||||
end
|
end
|
||||||
end),
|
end),
|
||||||
["<C-k>"] = cmp.mapping(function(fallback)
|
["<C-k>"] = cmp.mapping(function()
|
||||||
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
|
||||||
fallback()
|
ls.jump(-1)
|
||||||
end
|
end
|
||||||
end),
|
end),
|
||||||
["<C-space>"] = cmp.mapping(function()
|
["<C-space>"] = cmp.mapping(function()
|
||||||
@@ -32,22 +32,11 @@ cmp.setup({
|
|||||||
end
|
end
|
||||||
end),
|
end),
|
||||||
["<TAB>"] = cmp.mapping(function(fallback)
|
["<TAB>"] = cmp.mapping(function(fallback)
|
||||||
if ls.jumpable(1) then
|
if cmp.visible() then
|
||||||
ls.jump(1)
|
cmp.confirm({
|
||||||
else
|
select = true,
|
||||||
if cmp.visible() then
|
behavior = cmp.SelectBehavior.Insert,
|
||||||
cmp.confirm({
|
})
|
||||||
select = true,
|
|
||||||
behavior = cmp.SelectBehavior.Insert,
|
|
||||||
})
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
["<S-TAB>"] = cmp.mapping(function(fallback)
|
|
||||||
if ls.jumpable(-1) then
|
|
||||||
ls.jump(-1)
|
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user