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:
Bruno BELANYI 2022-03-07 21:57:59 +01:00
parent 3673ec604a
commit 32890d6cf2

View file

@ -14,18 +14,14 @@ cmp.setup({
},
mapping = {
["<Tab>"] = function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
if luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end,
["<S-Tab>"] = function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
if luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()