Skip to content

docs(schema): document every top-level config key#8

Merged
binbandit merged 1 commit into
mainfrom
docs/complete-schema-reference
Jun 10, 2026
Merged

docs(schema): document every top-level config key#8
binbandit merged 1 commit into
mainfrom
docs/complete-schema-reference

Conversation

@binbandit

@binbandit binbandit commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

docs/src/content/docs/reference/schema.md — the user-facing "what's allowed in user.lua" reference — listed only 16 of the 23 top-level config keys, and its table promised an lsp section ("See below") that didn't exist anywhere on the page.

Changes:

  • Top-level keys table now lists all 23 keys from lua/blak/config/defaults.lua, including the previously missing version, performance, snacks, treesitter, lsp, mason, format, and lint.
  • New sections for each missing key, with shapes verified against the consuming code (core/lsp.lua, core/formatting.lua, core/treesitter.lua, core/tools.lua, plugins/ui.lua) rather than guessed — e.g. the format section documents the vim.g.blak_disable_autoformat escape hatches the formatter actually checks.
  • Honest validation claims: the old intro said "All required", implying everything was schema-checked. schema.lua validates 16 keys; the rest are deep-merged and passed through. Each row now says which it is, and the loosely-validated sections state it explicitly.
  • Drift guard: a new check_schema_doc_keys() in scripts/validate.py parses the top-level keys of defaults.lua and fails make validate if any key is missing from the schema doc's table — so a new config option can't ship undocumented again.

Validation

make validate passes; verified the new check fails correctly by removing a key row locally. make docs-build passes (85 pages).

@binbandit binbandit force-pushed the docs/complete-schema-reference branch from 8b240b3 to 80574dc Compare June 10, 2026 01:25
The schema reference's top-level table listed 16 of the 23 config keys
and promised an lsp section that did not exist. Add the missing keys
(version, performance, snacks, treesitter, lsp, mason, format, lint)
with their shapes from defaults.lua, and state which keys schema.lua
actually validates instead of claiming all are checked.

Add check_schema_doc_keys to scripts/validate.py so a new top-level
default cannot ship without a row in the schema doc.
@binbandit binbandit force-pushed the docs/complete-schema-reference branch from 80574dc to 9447950 Compare June 10, 2026 01:33
@binbandit binbandit merged commit 3be6b8e into main Jun 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant