Fix JSON schema configuration in multi root workspaces (#173169)

[json] add folderUri to SchemaAssociation and schema setting
This commit is contained in:
Martin Aeschlimann
2023-02-02 22:36:41 +01:00
committed by GitHub
parent 262ab0e7bf
commit bd9ac7a089
5 changed files with 29 additions and 71 deletions

View File

@@ -201,6 +201,7 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment)
fileMatch?: string[];
url?: string;
schema?: JSONSchema;
folderUri?: string;
}
@@ -313,7 +314,7 @@ export function startServer(connection: Connection, runtime: RuntimeEnvironment)
uri = schema.schema.id || `vscode://schemas/custom/${index}`;
}
if (uri) {
languageSettings.schemas.push({ uri, fileMatch: schema.fileMatch, schema: schema.schema });
languageSettings.schemas.push({ uri, fileMatch: schema.fileMatch, schema: schema.schema, folderUri: schema.folderUri });
}
});
}