fixed popup icosn

This commit is contained in:
Oliver Hartmann 2022-12-01 17:03:15 +01:00
parent 78544dcdbf
commit 0fcdf98cf3

View File

@ -12,24 +12,11 @@ end
cmp.setup({ cmp.setup({
formatting = { formatting = {
format = function(entry, vim_item) format = require('lspkind').cmp_format({
-- fancy icons and a name of kind mode = 'symbol_text', -- show only symbol annotations
vim_item.kind = require('lspkind').presets.default[vim_item.kind] .. ' ' .. vim_item.kind maxwidth = 80, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
-- set a name for each source ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
vim_item.menu = ({ })
buffer = '[Buffer]',
nvim_lsp = '[LSP]',
ultisnips = '[UltiSnips]',
nvim_lua = '[Lua]',
cmp_tabnine = '[TabNine]',
look = '[Look]',
path = '[Path]',
spell = '[Spell]',
calc = '[Calc]',
emoji = '[Emoji]',
})[entry.source.name]
return vim_item
end,
}, },
mapping = { mapping = {
['<Up>'] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's' }), ['<Up>'] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's' }),