Uh oh!
There was an error while loading. Please reload this page.
Add JSONC support for .vscode configuration files - #270933
Add JSONC support for .vscode configuration files#270933Parham MohammadAlizadeh (Prhmma) wants to merge 3 commits into
Conversation
cf8c868 to
1264824CompareMatthias Schoettle (mschoettle)
commented
Jul 22, 2026
Parham MohammadAlizadeh (@Prhmma)Raymond Zhao (@rzhao271) What's the status of this? It would be great to get support for this |
Parham MohammadAlizadeh (Prhmma)
commented
Jul 22, 2026
It is ready for review, |
Matthias Schoettle (mschoettle)
commented
Jul 22, 2026
Can you bring it up to date with |
…configs # Conflicts: # src/vs/workbench/services/configuration/browser/configuration.ts
1264824 to
1b4dd65Compare📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Raymond Zhao (@rzhao271)Matched files:
|
Parham MohammadAlizadeh (Prhmma)
commented
Jul 22, 2026
merge conflict resolved |
There was a problem hiding this comment.
Pull request overview
Adds .jsonc fallback support for workspace configuration files while preserving .json precedence.
Changes:
- Resolves settings, tasks, launch, MCP, and extension recommendations from
.jsonc. - Updates editor and recommendation workflows for JSONC resources.
- Adds JSONC loading and precedence tests.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
preferences.ts | Defines settings JSONC candidates. |
workspaceExtensionsConfig.ts | Loads and edits extensions.jsonc. |
configurationService.test.ts | Tests JSONC configuration loading. |
jsonEditingService.ts | Adds JSONC write fallback. |
configuration.ts (common) | Defines configuration candidates. |
configuration.ts (browser) | Resolves and watches JSONC files. |
preferencesContribution.ts | Registers the split editor for JSONC. |
extensionRecommendationsService.test.ts | Tests JSONC recommendations. |
extensionsActions.ts | Opens existing extensions.jsonc. |
Uh oh!
There was an error while loading. Please reload this page.
| private getResourceCandidates(resource: URI): URI[] { | ||
| const candidates = [resource]; | ||
| const path = resource.path; | ||
| if (path.endsWith('.json')) { | ||
| candidates.push(resource.with({ path: `${path.slice(0, -'.json'.length)}.jsonc` })); | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.
| if (!await this.fileService.exists(targetResource)) { | ||
| const jsoncAlternative = this.getJsoncAlternative(targetResource); | ||
| if (jsoncAlternative && await this.fileService.exists(jsoncAlternative)) { | ||
| targetResource = jsoncAlternative; |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Add JSONC support for .vscode configuration files
Fixes#269824
Manually tested with local instance, it works