Microsoft/vscode

[json] schema fileMatch for all *.json files in root folder

Ouverte

#44 135 ouverte le 21 févr. 2018

 (7 commentaires) (5 réactions) (1 personne assignée)TypeScript (39 847 forks)batch import
feature-requesthelp wantedjson

Métriques du dépôt

Stars
 (184 936 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

  • VSCode Version: 1.20.1
  • OS Version: Win 10 Does this issue occur when all extensions are disabled?: Yes

I've tried asking this on stackoverflow and gitter without success. I have a project with (among other things) lots of .json files. This is the .vscode/settings.json file:

{
    "json.schemas": [
        {
            "fileMatch": [
                "*.json"
            ],
            "url": "https://path/to/schema.json"
        }
    ]
}

The problem is that this matches all .json files in the project, but I need it to match only *.json files in the root directory. What can I put in fileMatch to enable this, or can this not be done with the file matching?

Guide contributeur