fix: nvim-cmp config
fix [Tab] behavior
This commit is contained in:
parent
a98e149ad1
commit
05d89420f0
@ -58,8 +58,8 @@ cmp.setup {
|
|||||||
select = true,
|
select = true,
|
||||||
}),
|
}),
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
if vim.fn.pumvisible() == 1 then
|
if cmp.visible() then
|
||||||
vim.fn.feedkeys(t "<C-n>", "n")
|
cmp.select_next_item()
|
||||||
elseif luasnip.expand_or_jumpable() then
|
elseif luasnip.expand_or_jumpable() then
|
||||||
luasnip.expand_or_jump()
|
luasnip.expand_or_jump()
|
||||||
elseif check_backspace() then
|
elseif check_backspace() then
|
||||||
@ -69,8 +69,8 @@ cmp.setup {
|
|||||||
end
|
end
|
||||||
end, { "i", "s" }),
|
end, { "i", "s" }),
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
if vim.fn.pumvisible() == 1 then
|
if cmp.visible() then
|
||||||
vim.fn.feedkeys(t "<C-p>", "n")
|
cmp.select_prev_item()
|
||||||
elseif luasnip.jumpable(-1) then
|
elseif luasnip.jumpable(-1) then
|
||||||
luasnip.jump(-1)
|
luasnip.jump(-1)
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user