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 = {
|
formatting = {
|
||||||
fields = { 'kind', 'abbr', 'menu' },
|
fields = { 'kind', 'abbr', 'menu' },
|
||||||
format = function(entry, vim_item)
|
format = lspkind.cmp_format({
|
||||||
vim_item.menu = ({
|
with_text = true,
|
||||||
|
menu = ({
|
||||||
buffer = '[Buffer]',
|
buffer = '[Buffer]',
|
||||||
nvim_lsp = '[Lsp]',
|
nvim_lsp = '[Lsp]',
|
||||||
nvim_lua = '[Lua]',
|
nvim_lua = '[Lua]',
|
||||||
path = '[Path]',
|
path = '[Path]',
|
||||||
luasnip = '[Snippet]',
|
luasnip = '[Snippet]',
|
||||||
})[entry.source.name]
|
})
|
||||||
vim_item.kind = lspkind.presets.default[vim_item.kind]
|
}),
|
||||||
return vim_item
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function (args)
|
expand = function (args)
|
||||||
|
|
Loading…
Reference in a new issue