helix icon indicating copy to clipboard operation
helix copied to clipboard

Opening theme.toml with taplo shows errors

Open A-Walrus opened this issue 2 years ago • 2 comments

Summary

When opening the theme.toml file with helix and the taplo lsp, a ton of errors appear: image

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:

  1. Have taplo lsp installed
  2. cd to your helix repo
  3. 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

A-Walrus avatar Aug 10 '22 12:08 A-Walrus

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.

the-mikedavis avatar Aug 10 '22 13:08 the-mikedavis

Closing in favor of #3901. Thanks for your report!

dead10ck avatar Sep 19 '22 22:09 dead10ck