Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lua/which-key/icons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ function M._get(rules, opts, check_ft)
end
end

-- plugin icons
if plugin then
-- pattern icons
if opts.desc then
for _, icon in ipairs(rules) do
if icon.plugin == plugin then
if icon.pattern and opts.desc:lower():find(icon.pattern) then
local ico, hl = M.get_icon(icon)
if ico then
return ico, hl
Expand All @@ -173,10 +173,10 @@ function M._get(rules, opts, check_ft)
end
end

-- pattern icons
if opts.desc then
-- plugin icons
if plugin then
for _, icon in ipairs(rules) do
if icon.pattern and opts.desc:lower():find(icon.pattern) then
if icon.plugin == plugin then
local ico, hl = M.get_icon(icon)
if ico then
return ico, hl
Expand Down