chore(vim): add mapping to exit completion

This is when inside a snippet the tab get taken over by the completion
menu, you can then not jump to the next mark in the snippet.

Now you can use <C-e> to close the completion menu and tab will then
jump to the next mark in the snippet.
This commit is contained in:
Ade Attwood 2022-07-10 21:11:42 +01:00
parent 110b609a26
commit 68c1b1ba32

View file

@ -10,6 +10,7 @@ cmp.setup({
mapping = cmp.mapping.preset.insert({
['<C-j>'] = cmp.get_config().mapping['<Down>'],
['<C-k>'] = cmp.get_config().mapping['<Up>'],
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping(function(_fallback)
if cmp.visible() then
cmp.confirm({ select = true })