yaml-language-server icon indicating copy to clipboard operation
yaml-language-server copied to clipboard

Disable automatic schema association for specific file

Open webdevred opened this issue 2 months ago • 1 comments

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.

webdevred avatar Oct 27 '25 12:10 webdevred

Also see https://github.com/redhat-developer/vscode-yaml/issues/245.

rcjsuen avatar Oct 27 '25 15:10 rcjsuen