Replies: 3 comments 1 reply
-
Well, I had this in my config that I did not see right away: cmp.setup.cmdline(
":",
{
sources = cmp.config.sources(
{
{name = "path"}
},
{
{name = "cmdline"}
}
),
mapping = cmp.mapping.preset.cmdline(),
}
) I removed this snippet and I got the raw cmdline again. Still, it would be nice to be able to specify a mapping allowing to doe down and up in directories with nvim-cmp. |
Beta Was this translation helpful? Give feedback.
-
Well, it does not work very well. After some time, I'm left without ANY completion in the command mode. Tab keystrokes just show edit: |
Beta Was this translation helpful? Give feedback.
-
This is what worked best for me: vim.api.nvim_create_autocmd({ "CmdlineEnter" }, {
pattern = { ":" },
callback = function()
local mappings = vim.api.nvim_get_keymap("c")
for _, v in pairs(mappings) do
if v.desc == "cmp.utils.keymap.set_map" then
vim.keymap.del("c", v.lhs)
end
end
end,
}) |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm having a hard time understanding how to configure the command-line completion and I wish to disable nvim-cmp for the command mode (when completing commands like
:e
).When running
nvim --clean
here is what I can do::e /usr/
<Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab>
it completes to/usr/local
<Down>
it enters the/usr/local
directory and suggest completions for/usr/local/bin/
<Up>
it suggest completions for/usr/local/
back againWhen running with nvim-cmp with no explicit mapping on arrow keys but a mapping on
Tab
as followsWhen trying to achieve the same, I cannot:
:e /usr/
<Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab>
it completes to/usr/local
okIs there a way I could configure the nvim-cmp mapping, for that, or at least disable nvim-cmp for the command wildmenu?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions