File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,11 @@ local icon_provider = false
1919local function get_icon (ctx )
2020 ctx .kind_hl_group = " BlinkCmpKind" .. ctx .kind
2121 if ctx .item .source_name == " LSP" then
22- local highlight_colors_avail , highlight_colors = pcall (require , " nvim-highlight-colors" )
23- local color_item = highlight_colors_avail and highlight_colors .format (ctx .item .documentation , { kind = ctx .kind })
22+ local item_doc , color_item = ctx .item .documentation , nil
23+ if item_doc then
24+ local highlight_colors_avail , highlight_colors = pcall (require , " nvim-highlight-colors" )
25+ color_item = highlight_colors_avail and highlight_colors .format (item_doc , { kind = ctx .kind })
26+ end
2427 if icon_provider == false then icon_provider = get_icon_provider () end
2528 if icon_provider then
2629 local icon = icon_provider (ctx .kind )
You can’t perform that action at this time.
0 commit comments