Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening theme.toml with taplo shows errors #3383

Closed
A-Walrus opened this issue Aug 10, 2022 · 3 comments
Closed

Opening theme.toml with taplo shows errors #3383

A-Walrus opened this issue Aug 10, 2022 · 3 comments
Labels
C-bug Category: This is a bug

Comments

@A-Walrus
Copy link
Contributor

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 A-Walrus added the C-bug Category: This is a bug label Aug 10, 2022
@the-mikedavis
Copy link
Member

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 (#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.

@A-Walrus
Copy link
Contributor Author

@dead10ck
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

3 participants