Skip to content

Commit

Permalink
fix(popupmenu): only use popupmenu hl group for known item kinds. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 4, 2023
1 parent d31fe94 commit 0b86a7b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/noice/ui/popupmenu/nui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ local Menu = require("nui.menu")
local Api = require("noice.api")
local NuiLine = require("nui.line")
local Scrollbar = require("noice.view.scrollbar")
local Highlights = require("noice.config.highlights")

local M = {}
---@type NuiMenu|NuiTree
Expand Down Expand Up @@ -54,7 +55,8 @@ end
---@param item CompleteItem
function M.format_kind(item)
if item.kind and item.kind ~= "" then
local hl_group = "NoiceCompletionItemKind" .. item.kind
local hl_group = "CompletionItemKind" .. item.kind
hl_group = Highlights.defaults[hl_group] and ("Noice" .. hl_group) or "NoiceCompletionItemKindDefault"
local icon = Config.options.popupmenu.kind_icons[item.kind]
item.text:append(" ")
if icon then
Expand Down

0 comments on commit 0b86a7b

Please sign in to comment.