neovim: add mappings to jump between choice in snippets

This commit is contained in:
2023-07-29 23:35:25 +03:00
parent 30927451c9
commit 900371bdef
2 changed files with 18 additions and 8 deletions

View File

@@ -58,20 +58,13 @@ cmp.setup({
}),
["<A-j>"] = cmp.mapping.scroll_docs(4),
["<A-k>"] = cmp.mapping.scroll_docs(-4),
["<C-l>"] = cmp.mapping(function(fallback)
["<C-f>"] = cmp.mapping(function(fallback)
if ls.expand_or_jumpable() then
ls.expand_or_jump()
else
fallback()
end
end),
["<C-h>"] = cmp.mapping(function(fallback)
if ls.jumpable(-1) then
ls.jump(-1)
else
fallback()
end
end),
},
sources = cmp.config.sources({
{ name = "nvim_lsp" },