fix(vim): add binding to jump between snippet placeholders
Currently it is set up to use tab to jump between placeholders and go to the next completion item. This is causing conflicts when typing variables in the snippet placeholders. Now you can use <CTRL-h> to jump to the next placeholders. This is only available when the completion is active so, dose not conflict with switching windows.
This commit is contained in:
parent
67f15d126d
commit
e7897fc7e0
1 changed files with 3 additions and 0 deletions
|
|
@ -37,6 +37,9 @@ cmp.setup({
|
|||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-j>'] = cmp.get_config().mapping['<Down>'],
|
||||
['<C-k>'] = cmp.get_config().mapping['<Up>'],
|
||||
['<C-l>'] = function() luasnip.jump(1) end,
|
||||
['<C-h>'] = function() luasnip.jump(-1) end,
|
||||
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping(function(_fallback)
|
||||
if cmp.visible() then
|
||||
|
|
|
|||
Loading…
Reference in a new issue