add cargo config jsonschema support for editor auto completion and docs jumping #14482
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR try to resolve?
There is not yet editor hint and completion support for
.cargo/config.toml
.So I impl it.
Related
Publish
.cargo/config.toml
jsonschema toschemastore.org
for editor #12883[feat]
.cargo/config.toml
SchemaStore/schemastore#3349Goals
[x] vscode tab completion on key
[x] vscode tab completion on value candidates
[x] vscode err hint when invalid key/value
[x] vscode hint on document url
How should we test and review this PR?
Review
schema/cargo-config.schema.d.mts
.The jsonschema is generate from typescript using
npm:typescript-json-schema@0.65.1
.Try genereated jsonschema using any supported editor toml extension.
Additional information
As result, you can see the output jsonschema is very large.
Not able to let human write it.
So I generate it from typescript dts.
Maybe someone can impl macro rules to generate jsonschema, website docs and cli parser at the same time in the future.