Closed zanglg closed 1 year ago
A part of my setup
cmp.setup({
...
formatting = {
format = function(entry, vim_item)
vim_item.kind = lspkind[vim_item.kind] .. " " .. vim_item.kind
vim_item.menu = ({
buffer = "[Buffer]",
path = "[Path]",
nvim_lsp = "[LSP]",
nvim_lua = "[NvimLua]",
luasnip = "[LuaSnip]",
dictionary = "[Dict]",
})[entry.source.name]
vim_item.dup = ({
buffer = 0,
nvim_lua = 0,
dictionary = 0,
})[entry.source.name] or 1
return vim_item
end,
},
...
})
that works, thanks.
the text was not shown with
dictionary
, how should I config for that purpose, here was my config: