nvim: add lspkind
This commit is contained in:
parent
6e6bb3422c
commit
2bc3938654
2 changed files with 10 additions and 0 deletions
|
@ -53,6 +53,7 @@ in
|
||||||
comment-nvim
|
comment-nvim
|
||||||
dashboard-nvim
|
dashboard-nvim
|
||||||
lsp_lines-nvim
|
lsp_lines-nvim
|
||||||
|
lspkind-nvim
|
||||||
lualine-lsp-progress
|
lualine-lsp-progress
|
||||||
lualine-nvim
|
lualine-nvim
|
||||||
luasnip
|
luasnip
|
||||||
|
|
|
@ -92,9 +92,18 @@ require("nvim-treesitter.configs").setup({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local lspkind = require("lspkind")
|
||||||
|
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
local luasnip = require("luasnip")
|
local luasnip = require("luasnip")
|
||||||
cmp.setup({
|
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 = {
|
snippet = {
|
||||||
-- REQUIRED - you must specify a snippet engine
|
-- REQUIRED - you must specify a snippet engine
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
|
|
Loading…
Reference in a new issue