All cmp sources treated as Variable in cmdline mode
technicalpickles opened this issue · 1 comments
technicalpickles commented
I've been using lspkind for awhile, and recently started trying to cmp's cmdline mode, ie:
cmp.setup({
--
formatting = {
format = lspkind.cmp_format({
mode = "symbol_text", -- show only symbol annotations
-- maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
ellipsis_char = "...", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
symbol_map = {
Copilot = "",
},
}),
},
--- ...
}
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.insert({
}),
sources = {
{ name = 'cmdline' },
{
name = 'path',
keyword_length = 2,
option = {
trailing_slash = true,
}
}
})
it seems like both cmdline
and path
end up treated as variables
, ie:
I think either I would want:
- to not show any lsp kind info
- map
path
andcmdline
to a kind that makes sense (File
andFunction
?)
I do see a before
callback that runs first
lspkind.nvim/lua/lspkind/init.lua
Lines 189 to 191 in 1735dd5
... but I haven't figured out what to try to fill in to get it to skip the rest of the formatting. I do know that vim.fn.getcmdtype()
returns an empty string if it's not in a command mode, so figure that could be used somehow.