rio icon indicating copy to clipboard operation
rio copied to clipboard

Add jsonschema for config.toml

Open FlyinPancake opened this issue 2 years ago • 3 comments

I'd like to have a schema for the configuration file so it's possible to have intellisense help with the config file.

The documentation is here https://www.schemastore.org/json/

FlyinPancake avatar Oct 25 '23 10:10 FlyinPancake

That's a good idea, is this something you would like to contribute with? Probably will need to follow the changes like in this PR https://github.com/SchemaStore/schemastore/pull/3214/files

Marking this issue as wishlist

raphamorim avatar Oct 26 '23 15:10 raphamorim

On it (as in: already started). Unless someone beats me to it first.

LaurentFough avatar Oct 31 '23 23:10 LaurentFough

On it (as in: already started). Unless someone beats me to it first.

Ok — pretty sure I've got the schema done.

Giving it a once-over for any bugs, or if I've missed any configuration options. I think I may have to clean up the sub-sections and some arrays, but validation works as expected for now.

  • I've validated the config.toml using the created json schema on the cli, using taplo,
  • which is used by "Even Better TOML" in VSCode|ium... but the LSP seems to be currently broken in VSCodium, so can't test hinting and suggestions|autocompletion.

More to come. I'll pop the schema in the repo/fork shortly. (see below)

Update:

LaurentFough avatar Nov 03 '23 07:11 LaurentFough