Skip to content

Supply JSON schemas for YAML files #12651

@thernstig

Description

@thernstig

Feature Request

Files like .clang-format etc. have a JSON schema, see https://json.schemastore.org/clang-format.json.

Users can reference those schemas in a few ways in VS Code. For example if using the most common YAML extension in VS Code, one can associate a schema like this:

# yaml-language-server: $schema=<urlToTheSchema>

However, to avoid this manual addition, this extension should automatically contribute so that common file name conventions (.clang-format, .clang-tidy etc.) automatically gets the correct JSON schemas.

I believe this is one way to get this working: https://code.visualstudio.com/api/references/contribution-points#contributes.jsonValidation

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions