nvim: after/plugin/cmp: Show LSP kind type name during completion
This commit is contained in:
parent
d0b93a537a
commit
1643837553
1 changed files with 5 additions and 6 deletions
|
@ -13,17 +13,16 @@ cmp.setup {
|
|||
},
|
||||
formatting = {
|
||||
fields = { 'kind', 'abbr', 'menu' },
|
||||
format = function(entry, vim_item)
|
||||
vim_item.menu = ({
|
||||
format = lspkind.cmp_format({
|
||||
with_text = true,
|
||||
menu = ({
|
||||
buffer = '[Buffer]',
|
||||
nvim_lsp = '[Lsp]',
|
||||
nvim_lua = '[Lua]',
|
||||
path = '[Path]',
|
||||
luasnip = '[Snippet]',
|
||||
})[entry.source.name]
|
||||
vim_item.kind = lspkind.presets.default[vim_item.kind]
|
||||
return vim_item
|
||||
end,
|
||||
})
|
||||
}),
|
||||
},
|
||||
snippet = {
|
||||
expand = function (args)
|
||||
|
|
Loading…
Reference in a new issue