Integration with cmp-cmdline #241
-
Hi, Thanks for this great, promising Neovim completion plugin! I read in the README that cmd line completion is a planned missing feature. In the meantime, I tried setting up blink.cmp together with blink.compat to support cmp-cmdline but I'm unsure if this is possible. In my previous nvim-cmp config, I used both of the suggested configurations in the README of cmp-cmdline: -- `/` cmdline setup.
cmp.setup.cmdline('/', {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
-- `:` cmdline setup.
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{
name = 'cmdline',
option = {
ignore_cmds = { 'Man', '!' }
}
}
})
}) Following the example in the README of blink.cmp I've tried the following: {
'saghen/blink.cmp',
-- ...
opts = {
-- ...
sources = {
completion = {
enabled_providers = { 'lsp', 'path', 'snippets', 'buffer', 'cmdline' },
},
providers = {
cmdline = {
name = 'cmdline',
module = 'blink.compat.source',
},
},
}, I'm unsure how to configure it further. Is it possible to make it function? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Some related discussions took place in #144. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately, this isn't possible as the trigger code needs to be updated to grab the keyword, and the windowing code needs to show the window on the cmdline cursor. I'm actually not sure it's possible to show windows while in cmdline mode but I haven't looked into how nvim-cmp does it |
Beta Was this translation helpful? Give feedback.
Unfortunately, this isn't possible as the trigger code needs to be updated to grab the keyword, and the windowing code needs to show the window on the cmdline cursor. I'm actually not sure it's possible to show windows while in cmdline mode but I haven't looked into how nvim-cmp does it