This commit is contained in:
scbj
2025-01-13 17:37:31 +01:00
parent 6fa677018a
commit 1f2c2dd380
4 changed files with 31 additions and 12 deletions

View File

@@ -96,18 +96,14 @@ return {
-- Select next/previous item with Tab / Shift + Tab
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_locally_jumpable() then
if luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.locally_jumpable(-1) then
if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
else
fallback()