nvim: add lspkind

dev-docs
Moritz Böhme 2023-02-18 16:22:21 +01:00
parent 6e6bb3422c
commit 2bc3938654
Signed by: moritz
GPG Key ID: 970C6E89EB0547A9
2 changed files with 10 additions and 0 deletions

View File

@ -53,6 +53,7 @@ in
comment-nvim
dashboard-nvim
lsp_lines-nvim
lspkind-nvim
lualine-lsp-progress
lualine-nvim
luasnip

View File

@ -92,9 +92,18 @@ require("nvim-treesitter.configs").setup({
},
})
local lspkind = require("lspkind")
local cmp = require("cmp")
local luasnip = require("luasnip")
cmp.setup({
formatting = {
format = 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)
}),
},
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)