cmp menu formated

This commit is contained in:
Oliver Hartmann 2025-04-03 23:15:18 +02:00
parent a1ce67e857
commit 353553c167
2 changed files with 42 additions and 13 deletions

View File

@ -103,18 +103,16 @@ return {
}, },
}, },
formatting = { formatting = {
fields = { 'kind', 'abbr' }, fields = { 'kind', 'abbr', 'menu' },
expandable_indicator = false, expandable_indicator = false,
format = lspkind.cmp_format({ format = function(entry, vim_item)
mode = 'symbol', local kind = require('lspkind').cmp_format({ mode = 'symbol_text', maxwidth = 50 })(entry, vim_item)
menu = ({ local strings = vim.split(kind.kind, '%s', { trimempty = true })
buffer = '[Buffer]', kind.kind = ' ' .. (strings[1] or '') .. ' '
nvim_lsp = '[LSP]', kind.menu = ' (' .. (strings[2] or '') .. ')'
luasnip = '[LuaSnip]',
nvim_lua = '[Lua]', return kind
latex_symbols = '[Latex]', end,
})
}),
}, },
}) })

View File

@ -5,7 +5,7 @@ return {
config = function() config = function()
local colors = require('bamboo.palette') local colors = require('bamboo.palette')
require('bamboo').setup({ require('bamboo').setup({
dim_inactive = false, -- Dim inactive windows/buffers dim_inactive = false, -- Dim inactive windows/buffers
lualine = { lualine = {
transparent = false, -- lualine center bar transparency transparent = false, -- lualine center bar transparency
}, },
@ -34,7 +34,38 @@ return {
['BlinkCmpMenu'] = { bg = colors.vulgaris.bg2 }, ['BlinkCmpMenu'] = { bg = colors.vulgaris.bg2 },
['BlinkCmpDoc'] = { bg = colors.vulgaris.bg2 }, ['BlinkCmpDoc'] = { bg = colors.vulgaris.bg2 },
['CmpDocumentation'] = { bg = colors.vulgaris.bg2 }, ['CmpDocumentation'] = { bg = colors.vulgaris.bg2 },
['BlinkCmpMenuSelection'] = { bg = colors.vulgaris.grey } ['BlinkCmpMenuSelection'] = { bg = colors.vulgaris.grey },
['PmenuSel'] = { bg = '#282C34', fg = 'NONE' },
['Pmenu'] = { fg = '#C5CDD9', bg = '#22252A' },
['CmpItemAbbrDeprecated'] = { fg = '#7E8294', bg = 'NONE', strikethrough = true },
['CmpItemAbbrMatch'] = { fg = '#82AAFF', bg = 'NONE', bold = true },
['CmpItemAbbrMatchFuzzy'] = { fg = '#82AAFF', bg = 'NONE', bold = true },
['CmpItemMenu'] = { fg = '#C792EA', bg = 'NONE', italic = true },
['CmpItemKindField'] = { fg = '#EED8DA', bg = '#B5585F' },
['CmpItemKindProperty'] = { fg = '#EED8DA', bg = '#B5585F' },
['CmpItemKindEvent'] = { fg = '#EED8DA', bg = '#B5585F' },
['CmpItemKindText'] = { fg = '#C3E88D', bg = '#9FBD73' },
['CmpItemKindEnum'] = { fg = '#C3E88D', bg = '#9FBD73' },
['CmpItemKindKeyword'] = { fg = '#C3E88D', bg = '#9FBD73' },
['CmpItemKindConstant'] = { fg = '#FFE082', bg = '#D4BB6C' },
['CmpItemKindConstructor'] = { fg = '#FFE082', bg = '#D4BB6C' },
['CmpItemKindReference'] = { fg = '#FFE082', bg = '#D4BB6C' },
['CmpItemKindFunction'] = { fg = '#EADFF0', bg = '#A377BF' },
['CmpItemKindStruct'] = { fg = '#EADFF0', bg = '#A377BF' },
['CmpItemKindClass'] = { fg = '#EADFF0', bg = '#A377BF' },
['CmpItemKindModule'] = { fg = '#EADFF0', bg = '#A377BF' },
['CmpItemKindOperator'] = { fg = '#EADFF0', bg = '#A377BF' },
['CmpItemKindVariable'] = { fg = '#C5CDD9', bg = '#7E8294' },
['CmpItemKindFile'] = { fg = '#C5CDD9', bg = '#7E8294' },
['CmpItemKindUnit'] = { fg = '#F5EBD9', bg = '#D4A959' },
['CmpItemKindSnippet'] = { fg = '#F5EBD9', bg = '#D4A959' },
['CmpItemKindFolder'] = { fg = '#F5EBD9', bg = '#D4A959' },
['CmpItemKindMethod'] = { fg = '#DDE5F5', bg = '#6C8ED4' },
['CmpItemKindValue'] = { fg = '#DDE5F5', bg = '#6C8ED4' },
['CmpItemKindEnumMember'] = { fg = '#DDE5F5', bg = '#6C8ED4' },
['CmpItemKindInterface'] = { fg = '#D8EEEB', bg = '#58B5A8' },
['CmpItemKindColor'] = { fg = '#D8EEEB', bg = '#58B5A8' },
['CmpItemKindTypeParameter'] = { fg = '#D8EEEB', bg = '#58B5A8' },
}, },
}) })
require('bamboo').load() require('bamboo').load()