Skip to content

Commit

Permalink
fix(docgen): display keybind data in the form of a dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed Jul 16, 2024
1 parent 582d7b6 commit 572de72
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docgen/docgen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -604,15 +604,18 @@ docgen.generators = {
log.error("Invalid keybind description:", err)
end

table.insert(layout, string.format("- `%s` - %s", key, description))
table.insert(layout, string.format(" - Default map: `%s`", data.rhs))
table.insert(layout, "- <details>")
table.insert(layout, string.format(" <summary> `%s` - %s </summary>", key, description))
table.insert(layout, "")
table.insert(layout, string.format(" - Default map: `%s`", data.rhs))
if mnemonic then
table.insert(
layout,
string.format(" - Mnemonic: %s", docgen.format_mnemonic(mnemonic))
string.format(" - Mnemonic: %s", docgen.format_mnemonic(mnemonic))
)
end

table.insert(layout, "")
table.insert(layout, " </details>")
table.insert(layout, "")
end
end
Expand Down

0 comments on commit 572de72

Please sign in to comment.