Problem
In a multi-root workspace with different XML schemas per sub-project, it is not possible to scope xml.fileAssociations or xml.catalogs to individual folders. The extension reads these settings globally (or at workspace level) and applies them to all folders. A *.code-workspace with per-folder settings overrides for these keys is silently ignored.
Example
Setting per-folder overrides like:
// services/api/.vscode/settings.json
{
"xml.fileAssociations": [
{ "pattern": "**/*.xml", "systemId": "schemas/api-schema.xsd" }
]
}
has no effect — the workspace-level (empty) array wins for ALL folders.
Expected Behaviour
The extension should use vscode.workspace.getConfiguration('xml', document.uri) (URI-scoped lookup) so that VS Code's native folder-override resolution applies. This is a two-line change per config key access and is backwards-compatible (falls back to workspace/user settings when no folder override exists).
Proposed Fix
Replace:
const assocs = vscode.workspace.getConfiguration('xml').get('fileAssociations');
with:
const assocs = vscode.workspace.getConfiguration('xml', document.uri).get('fileAssociations');
Environment
- OS: Windows 11 / macOS (reproducible on both)
- VS Code: 1.89+ multi-root workspace
- Extension: redhat.vscode-xml latest
Problem
In a multi-root workspace with different XML schemas per sub-project, it is not possible to scope
xml.fileAssociationsorxml.catalogsto individual folders. The extension reads these settings globally (or at workspace level) and applies them to all folders. A*.code-workspacewith per-folder settings overrides for these keys is silently ignored.Example
Setting per-folder overrides like:
has no effect — the workspace-level (empty) array wins for ALL folders.
Expected Behaviour
The extension should use
vscode.workspace.getConfiguration('xml', document.uri)(URI-scoped lookup) so that VS Code's native folder-override resolution applies. This is a two-line change per config key access and is backwards-compatible (falls back to workspace/user settings when no folder override exists).Proposed Fix
Replace:
with:
Environment