mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Add SchemaRetry notification to jsonServerMain
This commit is contained in:
parent
27ce1616ca
commit
7814f38222
|
@ -34,6 +34,10 @@ namespace SchemaContentChangeNotification {
|
|||
export const type: NotificationType<string, any> = new NotificationType('json/schemaContent');
|
||||
}
|
||||
|
||||
namespace SchemaRetryNotification {
|
||||
export const type: NotificationType<string, any> = new NotificationType('json/schemaRetry');
|
||||
}
|
||||
|
||||
// Create a connection for the server
|
||||
const connection: IConnection = createConnection();
|
||||
|
||||
|
@ -207,6 +211,14 @@ connection.onNotification(SchemaContentChangeNotification.type, uri => {
|
|||
languageService.resetSchema(uri);
|
||||
});
|
||||
|
||||
// Retry schema validation on all open documents
|
||||
connection.onNotification(SchemaRetryNotification.type, uri => {
|
||||
const document = documents.get(uri);
|
||||
if (document) {
|
||||
triggerValidation(document);
|
||||
}
|
||||
});
|
||||
|
||||
function updateConfiguration() {
|
||||
const languageSettings = {
|
||||
validate: true,
|
||||
|
@ -405,4 +417,4 @@ connection.onFoldingRanges((params, token) => {
|
|||
});
|
||||
|
||||
// Listen on the connection
|
||||
connection.listen();
|
||||
connection.listen();
|
||||
|
|
Loading…
Reference in a new issue