Use fallback for displaying completion source

This commit is contained in:
Sonny Bakker 2025-01-03 21:40:38 +01:00
parent a3353cc601
commit 2bbf7655c9

View file

@ -105,7 +105,9 @@ cmp.setup({
formatting = { formatting = {
format = function(entry, vim_item) format = function(entry, vim_item)
if entry.source.name == 'nvim_lsp' then if entry.source.name == 'nvim_lsp' then
vim_item.menu = entry.source.source.client.name vim_item.menu = string.format('[%s]', entry.source.source.client.name)
else
vim_item.menu = string.format('[%s]', entry.source.name)
end end
return vim_item return vim_item