Don't use tab for autocomplete selection
This commit is contained in:
@@ -45,9 +45,7 @@ cmp.setup {
|
||||
select = true
|
||||
}),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
vim.api.nvim_feedkeys(t("<C-n>"), "n", true)
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
if luasnip.expand_or_jumpable() then
|
||||
vim.api.nvim_feedkeys(t("<Plug>luasnip-expand-or-jump"), "", true)
|
||||
else
|
||||
fallback()
|
||||
@@ -57,9 +55,7 @@ cmp.setup {
|
||||
"s",
|
||||
}),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
vim.api.nvim_feedkeys(t("<C-p>"), "n", true)
|
||||
elseif luasnip.jumpable(-1) then
|
||||
if luasnip.jumpable(-1) then
|
||||
vim.api.nvim_feedkeys(t("<Plug>luasnip-jump-prev"), "", true)
|
||||
else
|
||||
fallback()
|
||||
|
||||
Reference in New Issue
Block a user