helix
helix copied to clipboard
Opening theme.toml with taplo shows errors
Summary
When opening the theme.toml
file with helix and the taplo
lsp, a ton of errors appear:
This is because taplo
uses the json schema store for schemas. (This is useful, for example, to detect errors in Cargo.toml
). The json schema store has a schema for theme.json
(schema) which comes from WordPress and has nothing to do with helix. This schema is incorrectly used for helix's theme.toml
file.
Reproduction Steps
I tried this:
- Have taplo lsp installed
- cd to your helix repo
-
hx theme.toml
I expected this to happen: No errors show
Instead, this happened: Many errors appear
Helix log
~/.cache/helix/helix.log
please provide a copy of `~/.cache/helix/helix.log` here if possible, you may need to redact some of the lines
Platform
Linux
Terminal Emulator
Kitty
Helix Version
helix 22.05
Is there a way for us to write a schema for themes which would override the theme.json one? Ideally we could do the same for config.toml
to add auto-complete (https://github.com/helix-editor/helix/issues/2894)
Alternatively it would be nice if we could configure this behavior in the args passed to taplo in languages.toml. I think it's a little assumptive of taplo to automatically consider all theme.toml
files to be wordpress themes.
Closing in favor of #3901. Thanks for your report!