fixed cmp tab
This commit is contained in:
parent
cf54f4bd90
commit
9150964742
@ -51,7 +51,9 @@ return {
|
|||||||
s = cmp.mapping.confirm({ select = false }),
|
s = cmp.mapping.confirm({ select = false }),
|
||||||
}),
|
}),
|
||||||
['<Tab>'] = cmp.mapping(function(fallback)
|
['<Tab>'] = cmp.mapping(function(fallback)
|
||||||
if luasnip.expand_or_jumpable() then
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
elseif luasnip.expand_or_jumpable() then
|
||||||
vim.api.nvim_feedkeys(t('<Plug>luasnip-expand-or-jump'), '', true)
|
vim.api.nvim_feedkeys(t('<Plug>luasnip-expand-or-jump'), '', true)
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
@ -61,7 +63,9 @@ return {
|
|||||||
's',
|
's',
|
||||||
}),
|
}),
|
||||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||||
if luasnip.jumpable(-1) then
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif luasnip.jumpable(-1) then
|
||||||
vim.api.nvim_feedkeys(t('<Plug>luasnip-jump-prev'), '', true)
|
vim.api.nvim_feedkeys(t('<Plug>luasnip-jump-prev'), '', true)
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user