[json] update diagnostics when schema changes. Fixes #137309

This commit is contained in:
Martin Aeschlimann 2021-11-17 16:14:48 +01:00
parent 35a8a61140
commit 9f1e991680
No known key found for this signature in database
GPG key ID: 2609A01E695523E3

View file

@ -255,7 +255,11 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment)
// A schema has changed
connection.onNotification(SchemaContentChangeNotification.type, uri => {
languageService.resetSchema(uri);
if (languageService.resetSchema(uri)) {
for (const doc of documents.all()) {
triggerValidation(doc);
}
}
});
// Retry schema validation on all open documents