update init.lua

This commit is contained in:
Rodney
2025-07-16 13:34:02 -04:00
parent c063d831a1
commit c3a48abd86
3 changed files with 101 additions and 5 deletions

View File

@@ -895,6 +895,39 @@ require('lazy').setup({
-- By default, you may press `<c-space>` to show the documentation.
-- Optionally, set `auto_show = true` to show the documentation after a delay.
documentation = { auto_show = false, auto_show_delay_ms = 500 },
menu = {
draw = {
components = {
-- customize the drawing of kind icons
kind_icon = {
text = function(ctx)
-- default kind icon
local icon = ctx.kind_icon
-- if LSP source, check for color derived from documentation
if ctx.item.source_name == "LSP" then
local color_item = require("nvim-highlight-colors").format(ctx.item.documentation, { kind = ctx.kind })
if color_item and color_item.abbr ~= "" then
icon = color_item.abbr
end
end
return icon .. ctx.icon_gap
end,
highlight = function(ctx)
-- default highlight group
local highlight = "BlinkCmpKind" .. ctx.kind
-- if LSP source, check for color derived from documentation
if ctx.item.source_name == "LSP" then
local color_item = require("nvim-highlight-colors").format(ctx.item.documentation, { kind = ctx.kind })
if color_item and color_item.abbr_hl_group then
highlight = color_item.abbr_hl_group
end
end
return highlight
end,
},
},
},
},
},
sources = {