Nice icons for completions

This commit is contained in:
Alexander Gehrke 2023-03-08 18:44:47 +01:00
parent c303fa0cec
commit 6f90d902b9
2 changed files with 11 additions and 0 deletions

View file

@ -1,4 +1,5 @@
local cmp = require('cmp')
local lspkind = require('lspkind')
cmp.setup({
snippet = {
@ -32,6 +33,14 @@ cmp.setup({
{ name = 'buffer' },
--{ name = 'path' },
}),
formatting = {
format = lspkind.cmp_format({
mode = 'symbol_text', -- show only symbol annotations
maxwidth = 80, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
ellipsis_char = '', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
symbol_map = { Copilot = "" },
})
},
})
--cmp.setup.cmdline({ '/', '?' }, {