helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
31.22k stars 2.31k forks source link

JSON schema for config files #10990

Closed niklasravnsborg closed 2 weeks ago

niklasravnsborg commented 2 weeks ago

Having schemas for the Helix config files (config.toml, some_theme.toml, languages.toml) would be highly beneficial. This would not only facilitate easier editing of configurations but could also enable auto-generation of documentation tables or other useful outputs.

Schemas can be integrated using the $schema key to enable editor completions:

"$schema" = 'https://example.org/schema.json'

For reference, here are a few example schema files:

Resources for creating a schema:

the-mikedavis commented 2 weeks ago

Duplicate of https://github.com/helix-editor/helix/issues/3901, also see https://github.com/helix-editor/helix/pull/8644