-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define config TOML/JSON schema #966
Conversation
See https://json-schema.org/ for details on how JSON schemas are interpreted. FWIW, how I'm using this schema locally for now is to symlink REPO/src/schemas/json/jj.json to ~/.config/jj/_schema.json and then add this directive to the top of my ~/.config/jj/config.toml: |
8017ce2
to
2525b6f
Compare
Can be used with tools like taplo-lsp to show hints & validation in editors/IDEs. Won't apply automatically to config files until it's submitted to schemastore.org, but in the meantime it can be used via a schema directive (https://taplo.tamasfe.dev/configuration/directives.html#the-schema-directive) or other manual config mechanism. Context in #879.
2525b6f
to
a8ed6c2
Compare
Resolved all comments. I don't know that a CHANGELOG update makes sense for this one since it's not explicitly hooked up yet as a jj feature, just a file that's in the repo if you know how to make use of it. Same for README/docs. And for tests, it's awkward to test the schema itself, but might make sense to hook up to some kind of testing eventually. |
Agreed. That checklist is meant as a reminder (particularly for me, because I've often forgotten to update those things :)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Feel free to merge.
Can be used with tools like taplo-lsp to show hints & validation in editors/IDEs. Won't apply automatically to config files until it's submitted to schemastore.org, but in the meantime it can be used via a schema directive
(https://taplo.tamasfe.dev/configuration/directives.html#the-schema-directive) or other manual config mechanism.
Context in #879.
Checklist
If applicable:
CHANGELOG.md