Skip to content

Commit

Permalink
chore(docgen): squash preset and scope information
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed Jul 16, 2024
1 parent 2332097 commit 9648e20
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions docgen/docgen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -559,21 +559,13 @@ docgen.generators = {
"",
}

local main_preset = "neorg"

for preset_name, preset_data in vim.spairs(keybind_data) do
table.insert(
layout,
string.format("# Preset `%s`%s", preset_name, preset_name == main_preset and " (default)" or "")
)
table.insert(layout, "")

for neorg_mode_name, neorg_mode_data in vim.spairs(preset_data) do
if neorg_mode_name == "all" then
table.insert(layout, "## Available in all Files")
table.insert(layout, string.format("## Preset `%s` / All Files", preset_name))
table.insert(layout, "")
elseif neorg_mode_name == "norg" then
table.insert(layout, "## Available in Norg Files Only")
table.insert(layout, string.format("## Preset `%s` / Norg Only", preset_name))
table.insert(layout, "")
end

Expand Down

0 comments on commit 9648e20

Please sign in to comment.