You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to get <C-j> and <C-k> to be the means by which I navigate menu options throughout nvim. Currently Tab and <S-Tab> work when selecting from options in the command line or search. I have tried the following but without success:
-- cmp-cmdline
-- `/` cmdline setup.
cmp.setup.cmdline('/', {
mapping = cmp.mapping.preset.cmdline({
['<C-j>'] = cmp.mapping(cmp.mapping.select_next_item()),
['<C-k>'] = cmp.mapping(cmp.mapping.select_prev_item()),
['<C-y>'] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
}),
sources = {
{ name = 'buffer' }
}
})
-- `:` cmdline setup.
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline({
['<C-j>'] = cmp.mapping(cmp.mapping.select_next_item()),
['<C-k>'] = cmp.mapping(cmp.mapping.select_prev_item()),
['<C-y>'] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
}),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline',
option = {
ignore_cmds = { 'Man', '!' }
}
},
mapping = cmp.mapping.preset.cmdline({}), -- fixes supertab
}),
})
I tried checking the mapping with :verbose cmap <C-j> and similarly for <C-k> and found that no mapping was found before or after including the config given above. Any help would be much appreciated!
The text was updated successfully, but these errors were encountered:
I am attempting to get
<C-j>
and<C-k>
to be the means by which I navigate menu options throughout nvim. CurrentlyTab
and<S-Tab>
work when selecting from options in the command line or search. I have tried the following but without success:I tried checking the mapping with
:verbose cmap <C-j>
and similarly for<C-k>
and found that no mapping was found before or after including the config given above. Any help would be much appreciated!The text was updated successfully, but these errors were encountered: