home: vim: completion: do not use tab to select
I would rather have my actual preferred mappings, <C-n> and <C-p>, for that.
This commit is contained in:
parent
3673ec604a
commit
32890d6cf2
|
@ -14,18 +14,14 @@ cmp.setup({
|
||||||
},
|
},
|
||||||
mapping = {
|
mapping = {
|
||||||
["<Tab>"] = function(fallback)
|
["<Tab>"] = function(fallback)
|
||||||
if cmp.visible() then
|
if luasnip.expand_or_jumpable() then
|
||||||
cmp.select_next_item()
|
|
||||||
elseif luasnip.expand_or_jumpable() then
|
|
||||||
luasnip.expand_or_jump()
|
luasnip.expand_or_jump()
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
["<S-Tab>"] = function(fallback)
|
["<S-Tab>"] = function(fallback)
|
||||||
if cmp.visible() then
|
if luasnip.jumpable(-1) then
|
||||||
cmp.select_prev_item()
|
|
||||||
elseif luasnip.jumpable(-1) then
|
|
||||||
luasnip.jump(-1)
|
luasnip.jump(-1)
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
|
|
Loading…
Reference in a new issue