coc-yaml icon indicating copy to clipboard operation
coc-yaml copied to clipboard

Extended glob matching for schema

Open RouNNdeL opened this issue 3 years ago • 2 comments

I'd like to apply the kubernetes schema to all yaml or yml file in a directory, but not files containing the word values, since these are Helm files and the schema does not apply. With extended glob this is very easy to accomplish: **/k8s/**/!(*values).+(yaml|yml)". It does not seem to be working with coc-yaml. Is there a way to accomplish this task?

RouNNdeL avatar Apr 18 '21 15:04 RouNNdeL

looks like an upstream issue https://github.com/redhat-developer/yaml-language-server/issues/422

AnthonyPoschen avatar May 26 '21 13:05 AnthonyPoschen

I was hoping/expecting that there would be some kind of ordered precedence so that I could do something like:

"yaml.schemas": {
    "kubernetes": "/*.yaml",
    "https://json.schemastore.org/kustomization": "/kustomization.yaml"
 }

Kubernetes for everything and has .yaml but then a specific filename such as kustomisation.yaml overrides the previous mach. Or better yet, takes precedence as it is more "specific".

Any way of doing this, or do we need to just wait for that upstream issue to be merged?

pslobo avatar Jun 24 '21 15:06 pslobo