nvim: lspkind fix

This commit is contained in:
PowerUser64 2022-05-13 04:26:31 -07:00
parent f511cc73ab
commit 5f5270220c

View file

@ -179,7 +179,17 @@ M.cmp = function()
formatting = {
format = function(entry, vim_item)
-- fancy icons and a name of kind
vim_item.kind = require("lspkind").presets.default[vim_item.kind] .. " " .. vim_item.kind
format = require('lspkind').cmp_format({
mode = 'symbol', -- show only symbol annotations
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
-- The function below will be called before any actual modifications from lspkind
-- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30))
-- before = function (entry, vim_item)
-- ...
-- return vim_item
-- end
})
-- set a name for each source
vim_item.menu = ({
path = "[Path]",