nvim: lspkind fix
This commit is contained in:
parent
f511cc73ab
commit
5f5270220c
1 changed files with 11 additions and 1 deletions
|
@ -179,7 +179,17 @@ M.cmp = function()
|
||||||
formatting = {
|
formatting = {
|
||||||
format = function(entry, vim_item)
|
format = function(entry, vim_item)
|
||||||
-- fancy icons and a name of kind
|
-- 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
|
-- set a name for each source
|
||||||
vim_item.menu = ({
|
vim_item.menu = ({
|
||||||
path = "[Path]",
|
path = "[Path]",
|
||||||
|
|
Loading…
Add table
Reference in a new issue