mirror of
https://github.com/tomru/nvim.git
synced 2026-03-04 23:17:14 +01:00
further customize lspkind
This commit is contained in:
@@ -4,7 +4,6 @@ return {
|
||||
lazy = false,
|
||||
priority = 100,
|
||||
dependencies = {
|
||||
'onsails/lspkind.nvim',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-buffer',
|
||||
@@ -12,6 +11,7 @@ return {
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
'rafamadriz/friendly-snippets',
|
||||
'zbirenbaum/copilot-cmp',
|
||||
'onsails/lspkind.nvim',
|
||||
},
|
||||
config = function()
|
||||
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
||||
@@ -19,7 +19,6 @@ return {
|
||||
|
||||
local cmp = require 'cmp'
|
||||
local lspkind = require 'lspkind'
|
||||
lspkind.init()
|
||||
|
||||
cmp.setup {
|
||||
sources = {
|
||||
@@ -52,8 +51,8 @@ return {
|
||||
expandable_indicator = true,
|
||||
fields = { 'abbr', 'kind' },
|
||||
format = lspkind.cmp_format {
|
||||
mode = 'symbol', -- show only symbol annotations
|
||||
maxwidth = 20, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
|
||||
mode = 'symbol_text', -- 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)
|
||||
show_labelDetails = true, -- show labelDetails in menu. Disabled by default
|
||||
|
||||
|
||||
@@ -198,6 +198,10 @@ return {
|
||||
-- default: symbol
|
||||
-- options: 'text', 'text_symbol', 'symbol_text', 'symbol'
|
||||
mode = 'symbol_text',
|
||||
preset = 'codicons',
|
||||
symbol_map = {
|
||||
Copilot = '',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user