lspkind with lsp-zero #143
-
How can I configure this plugin with lsp-zero? |
Beta Was this translation helpful? Give feedback.
Answered by
VonHeikemen
Feb 1, 2023
Replies: 1 comment 1 reply
-
If you are still using the local lsp = require('lsp-zero')
lsp.preset('recommended')
lsp.setup_nvim_cmp({
formatting = {
fields = {'abbr', 'kind', 'menu'},
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)
ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
-- 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
})
}
})
lsp.setup() |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
aryklein
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are still using the
recommended
preset you can use the function.setup_nvim_cmp
.