-
Notifications
You must be signed in to change notification settings - Fork 467
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
TOML schema for configuration #283
Comments
Nice to have! |
I have a few clarifying questions about the
I assume user configs are merged with the default one? |
I have a working draft of the schema - where should I put it for now? |
I mentioned generating docs from this earlier - I found this generator that can generate markdown files from a schema: https://github.com/coveooss/json-schema-for-humans. I think the output is pretty ugly but it is a good proof of concept. We could fork it maybe? I wouldn't suggest making one in Rust since there don't seem to be any good schema parsers or existing generators. |
Each element of that tuple has a
yazi/config/src/preview/preview.rs Lines 11 to 13 in d04f8ac
yazi/config/src/tasks/tasks.rs Lines 8 to 13 in d04f8ac
Yep and it's currently limited to the second level, see #51 (comment) |
Maybe we can create a new repo in |
Seems it doesn't support large sections of markdown content, I'm not quite sure how to integrate it into the existing docs, maybe we should keep them both? |
That would be nice! We could also experiment with generating documentation there before we try it on the docs repo. |
I was thinking we could fork it and work with some custom templates to refine it closer to what we have now, just more precise/accurate. |
I'm not sure if it is worth specifying the maximum number because it is so high but I'll just put a minimum of zero for all of those. |
Done. https://github.com/yazi-rs/scheme
This will be great. I will complete the documentation for the theme system (and part of the plugin system) before Yazi v1.0.5. I'm still considering the layout, which largely depends on the content. It might happened before that.
That's enough I think. |
Thank you! This is a little picky but I think |
Okay, done! |
Closed in #506. |
I'm going to lock this issue because it has been closed for 30 days. ⏳ This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
A schema for the various TOML configuration files that yazi uses would be great! Helpful for not just editing a configuration but also could be used to autogenerate tables or something on the docs.
Schemas can be added with the
$schema
to get editor completions:Here is an example schema from the Starship prompt: https://starship.rs/config-schema.json.
Resources for making a schema:
I'll give this a go in a PR sometime this week but wanted to open this up for discussion and if anyone else has experience with this.
The help wanted label relates to auto-generating documentation in yazi-rs/schemas#7 if you want to help!
The text was updated successfully, but these errors were encountered: