Skip to content

Commit

Permalink
feat(blink-cmp): add nvim-highlight-colors integration
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Dec 23, 2024
1 parent 11c0932 commit 84dbfa0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lua/astrocommunity/completion/blink-cmp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ local icon_provider = false
local function get_icon(ctx)
ctx.kind_hl_group = "BlinkCmpKind" .. ctx.kind
if ctx.item.source_name == "LSP" then
-- TODO: uncomment after nvim-highlight-colors PR merged: https://github.com/brenoprata10/nvim-highlight-colors/pull/135
-- local highlight_colors_avail, highlight_colors = pcall(require, "nvim-highlight-colors")
-- local color_item = highlight_colors_avail and highlight_colors.format(ctx.item.documentation, { kind = ctx.kind })
local highlight_colors_avail, highlight_colors = pcall(require, "nvim-highlight-colors")
local color_item = highlight_colors_avail and highlight_colors.format(ctx.item.documentation, { kind = ctx.kind })
if icon_provider == false then icon_provider = get_icon_provider() end
if icon_provider then
local icon = icon_provider(ctx.kind)
if icon then ctx.kind_icon = icon end
end
-- if color_item and color_item.abbr and color_item.abbr_hl_group then
-- ctx.kind_icon, ctx.kind_hl_group = color_item.abbr, color_item.abbr_hl_group
-- end
if color_item and color_item.abbr and color_item.abbr_hl_group then
ctx.kind_icon, ctx.kind_hl_group = color_item.abbr, color_item.abbr_hl_group
end
end
return ctx
end
Expand Down

0 comments on commit 84dbfa0

Please sign in to comment.