docs(schema): document every top-level config key#8
Merged
Conversation
8b240b3 to
80574dc
Compare
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.
80574dc to
9447950
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 anlspsection ("See below") that didn't exist anywhere on the page.Changes:
lua/blak/config/defaults.lua, including the previously missingversion,performance,snacks,treesitter,lsp,mason,format, andlint.core/lsp.lua,core/formatting.lua,core/treesitter.lua,core/tools.lua,plugins/ui.lua) rather than guessed — e.g. theformatsection documents thevim.g.blak_disable_autoformatescape hatches the formatter actually checks.schema.luavalidates 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.check_schema_doc_keys()inscripts/validate.pyparses the top-level keys ofdefaults.luaand failsmake validateif any key is missing from the schema doc's table — so a new config option can't ship undocumented again.Validation
make validatepasses; verified the new check fails correctly by removing a key row locally.make docs-buildpasses (85 pages).