Skip to content

Commit 572de72

Browse files
committed
fix(docgen): display keybind data in the form of a dropdown
1 parent 582d7b6 commit 572de72

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

docgen/docgen.lua

+7-4
Original file line numberDiff line numberDiff line change
@@ -604,15 +604,18 @@ docgen.generators = {
604604
log.error("Invalid keybind description:", err)
605605
end
606606

607-
table.insert(layout, string.format("- `%s` - %s", key, description))
608-
table.insert(layout, string.format(" - Default map: `%s`", data.rhs))
607+
table.insert(layout, "- <details>")
608+
table.insert(layout, string.format(" <summary> `%s` - %s </summary>", key, description))
609+
table.insert(layout, "")
610+
table.insert(layout, string.format(" - Default map: `%s`", data.rhs))
609611
if mnemonic then
610612
table.insert(
611613
layout,
612-
string.format(" - Mnemonic: %s", docgen.format_mnemonic(mnemonic))
614+
string.format(" - Mnemonic: %s", docgen.format_mnemonic(mnemonic))
613615
)
614616
end
615-
617+
table.insert(layout, "")
618+
table.insert(layout, " </details>")
616619
table.insert(layout, "")
617620
end
618621
end

0 commit comments

Comments
 (0)