redhat-developer / redhat-developer/vscode-yaml
Pick up schema from $schema prop like with JSON
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
In case of JSON files it's possible to discover the support for $schema naturally by following the Trigger Suggest command:
https://user-images.githubusercontent.com/1932383/126984982-a9660d62-b473-469c-833d-9665adcf9ff2.mov
Tho with YAML, even if you were to write out the comment you would see no autocompletion. To achieve same you should write out # yaml-language-server: $schema=https://json.schemastore.org/tsconfig. Which should be memoized, or stored as a snippet. or you should mess with configuration of this extension, which should be discovered in the first place and is not as portable as $schema is with json.
https://user-images.githubusercontent.com/1932383/126985088-6160c7ba-70bf-4ad9-9410-134386a13ff9.mov
Describe the solution you would like
It would be great to support similar UX to what exists with JSON. where suggestions help you discover $schema support and then by specifying $schema, schema is used to validate the file. no need to mess with extentsion configuration or comments.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing JSON "Trigger Suggest" behavior and the YAML language-server handling of $schema and yaml-language-server comments. Define how a YAML $schema property should trigger schema discovery and validation, then verify the behavior with the extension's existing test coverage; the issue names no specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100