Skip to content

Disable automatic schema association for specific file #1140

@webdevred

Description

@webdevred

Is your enhancement related to a problem? Please describe.

I'm using yaml-language-server together with schemaStore. It correctly fetches schemas, but it automatically associates a schema with one of my YAML files even though I don't want any schema applied to that file. This results in incorrect validation errors and warnings for a file that doesn't match any public schema.

Describe the solution you would like

I would like the ability to explicitly disable schema association for specific files or file patterns. For example, via a configuration setting where I can override the automatic association and specify "schema": "none" or similar.

Describe alternatives you have considered

  • Manually overriding the schema with another (invalid) schema, not ideal.
  • Renaming the file to avoid filename-based associations, not practical.
  • Disabling SchemaStore entirely, affects other YAML files negatively.

None of these options achieve the desired result cleanly.

Additional context

Some YAML files are internal tooling configuration and do not conform to any public schema. Being forced into schema validation for them makes editing noisy and confusing.

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