Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 29513d1

Browse files
author
Hinell
committed
feat(functions): display multi-mode functions
1 parent cf3a2a9 commit 29513d1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lua/legendary/ui/format.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,15 @@ function M.default_format(item)
3838
item.description,
3939
}
4040
elseif Toolbox.is_function(item) then
41+
-- stylua: ignore start
4142
return {
42-
Config.icons.fn,
43+
item--[[@as keymap ]]:modeSwitched()
44+
and table.concat(item--[[@as Keymap]]:modes(), ', ')
45+
or Config.icons.fn,
4346
'<function>',
4447
item.description,
4548
}
49+
-- stylua: ignore end
4650
elseif Toolbox.is_itemgroup(item) then
4751
return {
4852
item.icon or Config.icons.itemgroup,

0 commit comments

Comments
 (0)