Replies: 2 comments
-
I ran into the same issue, I couldn't make it work. :( |
Beta Was this translation helpful? Give feedback.
0 replies
-
If you want full control over the keymap, don't use the preset mapping = {
-- add 'c' to make it work in cmdline
['<C-e>'] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 's', 'c' }),
-- or this form
['<C-e>'] = {
i = cmp.mapping.select_prev_item(),
c = cmp.mapping.select_prev_item(),
},
-- also, inside a closure, you can't use `cmp.mapping` helper, instead, use cmp function directly
['<Esc>'] = function(fallback)
cmp.abort() -- instead of cmp.mapping.abort()
fallback()
end,
} You can see what that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
These are my mapping in cmp.setup:
This is my configuration for cmdline:
In my case
ctrl+e
is mapped toselect_previous_item()
and this works correctly usually but not but not incmdline
mode. Incmdline
instead of selecting previous item suggestion is cancelled as if no mapping was made at all since this is the standard behavior. I can't guess the cause since other mappings likectrl+n
toselect_next_item()
works correctly. Before posting it as an issue I'd like to see if anyone can give a hint on the cause of this strange behavior. Thanks before hand!Beta Was this translation helpful? Give feedback.
All reactions