[json] match only schemas of current folder

This commit is contained in:
Martin Aeschlimann 2017-08-29 08:37:02 +02:00
parent 2059716397
commit d0d00e8824

View file

@ -217,7 +217,12 @@ function getSettings(): Settings {
if (url && url[0] === '.') {
url = Uri.file(path.normalize(path.join(folder.uri.fsPath, url))).toString();
}
schemas.push({ url, fileMatch: schema.fileMatch, schema: schema.schema });
let fileMatch = schema.fileMatch;
if (fileMatch) {
fileMatch = fileMatch.map(m => path.join(folder.uri.path + '*', m));
}
schemas.push({ url, fileMatch, schema: schema.schema });
});
};
});