-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Publish schemas for other Zed extension config files (config.toml, extension.toml) #21994
Comments
Love it. |
Might also be an opportunity to clean parts of the format up with some deprecations; for entries in the |
Speaking of the last example there for zed/crates/extension/src/extension_manifest.rs Lines 110 to 112 in bc113e4
But the docs on https://zed.dev/docs/extensions/languages#language-servers continue to suggest |
I am always happy to review docs PRs! Note CI runs with
Ideally in addition to formalizing/publishing these schemas, I would love to implement tests on Pull Requests to the zed-industries/extensions fail (or at least warn) when extensions are using deprecated keys. Basically a PR-only test so we surface a warning for deprecated things (old keys, old schema versions, etc). |
#22107) Ref #21994 (comment), `language` is already deprecated but was still suggested in the docs here. Release Notes: - N/A
I don't think we actually have a preference here. We just support both. |
Happy to implement this! I think it might be easier to deal with these sort of things though if the scripts over at https://github.com/zed-industries/extensions were properly typed, written in TypeScript ideally. Not sure how the team feels about that though, if there is interest I'm willing to try converting the scripts over. Also, thinking a bit into the future. It's kind of annoying to only see the lints after you make the new/update PR. Wouldn't it be better to see the warnings during local development? Might be useful to provide some sort of linting tool as a package that can be used outside just this repository. Just a thought :) |
Also, connecting back to the original reason I opened this issue - if JSON schemas were provided (which doesn't seem too difficult seeing as Zed already uses |
The scripts in the extension repo are typed. We run the JS files through |
Sure, I see. I still think JSDoc leads to a worse DX and looser typing, but I understand your position. Where should I look to for adding JSON schemas to the rest of the config files? Is there a centralized process or are all the schema types spread out across the various crates? I understand they are generated via |
Currently the process is not automated. Theme JSON schema export is hacked into the theme-importer which I fixed as part of #21428. You can invoke with |
zed-industries#22107) Ref zed-industries#21994 (comment), `language` is already deprecated but was still suggested in the docs here. Release Notes: - N/A
Check for existing issues
Describe the feature
There is a schema for the themes JSON file, but no schemas for the
extension.toml
/extension.json
file or theconfig.toml
file for languages. Would be appreciated if there were at least schemas for these to supplement the docs and for improved editor experience.Environment
N/A
If applicable, add mockups / screenshots to help present your vision of the feature
No response
The text was updated successfully, but these errors were encountered: