mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
Listen to schema change events (for #27816)
This commit is contained in:
@@ -35,6 +35,10 @@ namespace VSCodeContentRequest {
|
||||
export const type: RequestType<string, string, any, any> = new RequestType('vscode/content');
|
||||
}
|
||||
|
||||
namespace SchemaContentChangeNotification {
|
||||
export const type: NotificationType<string, any> = new NotificationType('json/schemaContent');
|
||||
}
|
||||
|
||||
// Create a connection for the server
|
||||
let connection: IConnection = createConnection();
|
||||
|
||||
@@ -172,6 +176,11 @@ connection.onNotification(SchemaAssociationNotification.type, associations => {
|
||||
updateConfiguration();
|
||||
});
|
||||
|
||||
// A schema has changed
|
||||
connection.onNotification(SchemaContentChangeNotification.type, uri => {
|
||||
languageService.resetSchema(uri);
|
||||
});
|
||||
|
||||
function updateConfiguration() {
|
||||
let languageSettings: LanguageSettings = {
|
||||
validate: true,
|
||||
|
||||
Reference in New Issue
Block a user