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

Support taplo with schemas #3901

Closed
dead10ck opened this issue Sep 19, 2022 · 9 comments
Closed

Support taplo with schemas #3901

dead10ck opened this issue Sep 19, 2022 · 9 comments
Labels
C-enhancement Category: Improvements

Comments

@dead10ck
Copy link
Member

A couple of issues (#3383, #3897) have been opened around integration with taplo for TOML files related to Helix itself. It seems the root of this issue is that there are no schemas published for Helix.

I myself don't know much about how taplo works, or json schemas, but perhaps we could put together and publish a scheme, or maybe there's something we could check in and a default config setting we could use for them?

@ModProg
Copy link

ModProg commented Sep 23, 2023

For anyone interested in working on this, here is the documentation on how to create/publish schemas for taplo: https://taplo.tamasfe.dev/configuration/developing-schemas.html

@LukeHalasy
Copy link
Contributor

LukeHalasy commented Sep 27, 2023

I would love ❤️ to run with this.
Let's auto-generate the schema for helix-related TOML files as others have mentioned.

Additionally, we should commit the generated schema files since the possible keys + values within each TOML file change depending on the commit you are on.

Will be awesome to be able to view the documentation for all the possible keys within the TOML files without having to go to the book/website (especially for editing themes when you need to look up what every scope does).

(Would be a cool UX feature to have Taplo auto-installed along with helix so that anytime a new user goes to their config they have auto-complete enabled by default)

@ModProg
Copy link

ModProg commented Sep 27, 2023

Additionally, we should commit the generated schema files since the possible keys + values within each TOML file change depending on the commit you are on.

It should probably be possible for helix to tell taplo exactly what schema to use, so you always have the correct completions.

Publishing them to the Json Schema Store additionally makes sense, but I think it is save to assume that the config file you are editing is in most cases for the version of helix you are currently running.

@pascalkuthe
Copy link
Member

I don't really think it makes sense to invest a bunch of effort into writing and maintaining these schemas at this point since we plan to replace the toml config with a scheme based config in the future

@LukeHalasy
Copy link
Contributor

LukeHalasy commented Sep 27, 2023

I don't really think it makes sense to invest a bunch of effort into writing and maintaining these schemas at this point since we plan to replace the toml config with a scheme based config in the future

Thanks for the quick notice. I will NOT be running with this then.

Should we close this issue since the original description talks about "integration with taplo for TOML files related to Helix itself" and we are going to be moving away from TOML-based configs ?

@the-mikedavis
Copy link
Member

Yep, let's close this out since we're eventually planning on switching away from TOML

@the-mikedavis the-mikedavis closed this as not planned Won't fix, can't repro, duplicate, stale Sep 29, 2023
@andradei
Copy link

andradei commented Oct 8, 2023

What is Helix switching to?

@the-mikedavis
Copy link
Member

The plugin system will most likely be a scheme dialect, so config will be written in scheme and be scriptable rather than TOML

@1mjw
Copy link

1mjw commented Dec 1, 2023

keep both options; you are ruining a beautiful thing by eliminating TOML

@helix-editor helix-editor locked and limited conversation to collaborators Dec 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

7 participants