config(nvim): add lspkind

main
sudo pacman -Syu 2024-08-12 00:21:16 +07:00
parent e59eb68875
commit 0f936b9833
1 changed files with 11 additions and 0 deletions

View File

@ -224,9 +224,12 @@ require("lazy").setup({
dependencies = { dependencies = {
"hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer", "hrsh7th/cmp-buffer",
-- https://github.com/onsails/lspkind.nvim
"onsails/lspkind.nvim",
}, },
config = function() config = function()
local cmp = require("cmp") local cmp = require("cmp")
local lspkind = require("lspkind")
cmp.setup({ cmp.setup({
-- Custom -- Custom
@ -254,6 +257,14 @@ require("lazy").setup({
}, },
}, },
}), }),
formatting = {
format = lspkind.cmp_format({
mode = "symbol",
maxwidth = 50,
ellipsis_char = "...",
show_labelDetails = true,
}),
},
}) })
end, end,
}, },