https://github.com/zakj/helix-theme-schema
A JSON schema for Helix themes
https://github.com/zakj/helix-theme-schema
helix-editor schema themes
Last synced: 4 months ago
JSON representation
A JSON schema for Helix themes
- Host: GitHub
- URL: https://github.com/zakj/helix-theme-schema
- Owner: zakj
- License: mit
- Created: 2025-01-06T17:15:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-14T06:03:52.000Z (over 1 year ago)
- Last Synced: 2025-01-14T07:18:48.416Z (over 1 year ago)
- Topics: helix-editor, schema, themes
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# helix-theme-schema
> A JSON schema for [Helix][] themes
This allows for a bit of validation and completion when writing themes.
It includes documentation scraped from the [docs][] for some known properties.
Note that taplo's auto-completion does not understand that dotted properties must be quoted!

## Usage
There's no need to have a copy of this repository locally.
Add a [schema directive][] to the top of your theme file:
```toml
#:schema https://zakj.github.io/helix-theme-schema/theme.json
```
[taplo][] is defined as an LSP for helix by default, but you can add this to your `languages.toml` to get formatting:
```toml
[[language]]
name = "toml"
auto-format = true
formatter = { command = "taplo", args = ["fmt", "-"] }
```
With helix's default config, taplo will not validate unless you are in a "workspace", which means a parent directory must contain something like a `.git` repository.
If you see a `this document has been excluded` message from taplo after adding the schema, that's likely the problem.
[helix]: https://helix-editor.com/
[docs]: https://docs.helix-editor.com/themes.html
[schema directive]: https://taplo.tamasfe.dev/configuration/directives.html#the-schema-directive
[taplo]: https://taplo.tamasfe.dev/