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 d39c0419b7
commit 6f7f49dc13

View file

@ -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()