Skip to content

Add support for specifying schema via # $schema: … #959

@pascal-hofmann

Description

@pascal-hofmann

Is your enhancement related to a problem? Please describe.

JetBrains recently added support for specifying YAML schema via inline comment to their products. This looks similar to the modeline that can be used for yaml-language-server.

# $schema: …

Examples:

# $schema: https://example.com/path/to/schema.json
# $schema: ./schema.json

Describe the solution you would like

It would be great if yaml-language-server would support both ways (existing modeline, plus $schema: …) of specifying the schema inline, so we don't have to specify it twice.

Describe alternatives you have considered

None.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions