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

Usage with Multiple Schemas in a File?

Open mahyarmirrashed opened this issue 8 months ago • 1 comments

Summary

I'm doing something like this:

apiVersion: apps/v1
kind: Deployment
metadata:
  ...
spec:
  ...
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  ...
spec:
  ...

I'm using schema-companion.nvim to dynamically set the schema.

I'm wondering what I would need to change in there so that we have proper schema matching when there is the --- document separator in the YAML files? Currently, the schema is being applied to the whole file, and that's not what I want.

I don't want to have to put modelines everywhere as well.

Suggestions or clarifications would be great.

mahyarmirrashed avatar Jun 09 '25 17:06 mahyarmirrashed

Hey, any news? I'm also interested in this issue

Andrei-Vasil avatar Jul 27 '25 12:07 Andrei-Vasil