Skip to content

Commit

Permalink
feat(functions): display multi-mode functions
Browse files Browse the repository at this point in the history
  • Loading branch information
hinell committed Oct 19, 2023
1 parent cf3a2a9 commit 29513d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/legendary/ui/format.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,15 @@ function M.default_format(item)
item.description,
}
elseif Toolbox.is_function(item) then
-- stylua: ignore start
return {
Config.icons.fn,
item--[[@as keymap ]]:modeSwitched()
and table.concat(item--[[@as Keymap]]:modes(), ', ')
or Config.icons.fn,
'<function>',
item.description,
}
-- stylua: ignore end
elseif Toolbox.is_itemgroup(item) then
return {
item.icon or Config.icons.itemgroup,
Expand Down

0 comments on commit 29513d1

Please sign in to comment.