mirror of
https://github.com/rodneybbjr/kickstart.nvim.git
synced 2025-12-19 01:57:31 -05:00
update init.lua
This commit is contained in:
33
init.lua
33
init.lua
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user