cmp-cmdline
cmp-cmdline copied to clipboard
does not complete vim.ui.input
vim.ui.input accepts a completion option, however cmp-cmdline will not complete candidates, but wildmenu will.
I presume same problem with vim.ui.select
es:
:lua vim.ui.input({prompt = "complete me: ", completion = 'dir'}, function(input) print(input) end)
Yes. because the nvim-cmp's cmdline completion focueses to the : and / mode only at the moment.
Hi @hrsh7th! How can I make the regular Tab (wildmode) completion work in vim.ui.input while still using nvim cmp cmdline? If I have the following config:
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline({
-- Select candidate but don't execute with enter (do that with C-y)
['<CR>'] = {
c = cmp.mapping.confirm({
select = true,
}),
},
}),
sources = cmp.config.sources({
{ name = 'cmdline' },
}, {
{ name = 'path' },
}),
})
And try @rebelot snippet above then there is neither cmp nor regular Tab completion available. Any pointers are appreciated.
you can do the following:
cmp.setup.cmdline("@", {
sources = cmp.config.sources({
{ name = "path" },
{ name = "cmdline" },
}),
})
:h getcmdtype(), look at @
Awesome. Thanks @dsych