Skip to content

Commit afcf974

Browse files
authored
fix: unexpected jumps on tab click.
1 parent 7054d6a commit afcf974

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/plugins/completions.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ return {
3333
['<M-c>'] = cmp.mapping.abort(),
3434
['<CR>'] = cmp.mapping.confirm({ select = true }),
3535
["<Tab>"] = cmp.mapping(function(fallback)
36-
if luasnip.jumpable(1) then luasnip.jump(1)
36+
if cmp.visible() then cmp.select_next_item()
37+
elseif luasnip.locally_jumpable(1) then luasnip.jump(1)
3738
else fallback()
3839
end
3940
end, { "i", "s" }),

0 commit comments

Comments
 (0)