ironbar
ironbar copied to clipboard
Feature: JSON Schema for Config
Is your feature request related to a problem? Please describe. Configuration files currently can only be checked for syntax errors with taplo
Describe the solution you'd like Add an official syntax to the json schema store: https://taplo.tamasfe.dev/configuration/developing-schemas.html
Describe alternatives you've considered None
Additional context Pushing the json schema might also allow more lsps to check the config.
Yaml also has a schema, and maybe others do too
Taplo is a toml lsp but it uses json schemas to define lints, so json might be enough
Im not 100% sure its possible to filter for ironbar/config.toml though. I couldnt find a json schema filtering by parent folder so far.
Edit: It Might be possible with regexmatch
Found a library for this https://graham.cool/schemars/
Happy to add this, hopefully it should be a relatively straightforward build step to produce and export the schema.
Taplo is a toml lsp but it uses json schemas to define lints, so json might be enough
Yes I'm pretty sure the other formats just adopted the JSON schema format, so that should tick all the boxes. Corn may or may not eventually receive support too.
I'm now generating and hosting schemas, meaning you can now add
"$schema": "https://f.jstanger.dev/github/ironbar/schema.json",
to your JSON/YAML config to follow master.
For tagged releases, starting with 0.16.0 when that releases, you will be able to use schema-v0.16.0.json.