Add JSONC support for .vscode configuration files - #270933
Open
Parham MohammadAlizadeh (Prhmma) wants to merge 3 commits into
Open
Add JSONC support for .vscode configuration files#270933Parham MohammadAlizadeh (Prhmma) wants to merge 3 commits into
Parham MohammadAlizadeh (Prhmma) wants to merge 3 commits into
Conversation
Parham MohammadAlizadeh (Prhmma)
force-pushed
the
feature/jsonc-vscode-configs
branch
from
October 11, 2025 20:10
cf8c868 to
1264824
Compare
|
Parham MohammadAlizadeh (@Prhmma) Raymond Zhao (@rzhao271) What's the status of this? It would be great to get support for this |
Author
It is ready for review, |
|
Can you bring it up to date with |
…configs # Conflicts: # src/vs/workbench/services/configuration/browser/configuration.ts
Parham MohammadAlizadeh (Prhmma)
force-pushed
the
feature/jsonc-vscode-configs
branch
from
July 22, 2026 21:05
1264824 to
1b4dd65
Compare
Copilot started reviewing on behalf of
Parham MohammadAlizadeh (Prhmma)
July 22, 2026 21:05
View session
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Raymond Zhao (@rzhao271)Matched files:
|
Author
merge conflict resolved |
Contributor
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. |
Comment on lines
+325
to
+330
| 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` })); | ||
| } |
Comment on lines
+109
to
+112
| if (!await this.fileService.exists(targetResource)) { | ||
| const jsoncAlternative = this.getJsoncAlternative(targetResource); | ||
| if (jsoncAlternative && await this.fileService.exists(jsoncAlternative)) { | ||
| targetResource = jsoncAlternative; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add JSONC support for .vscode configuration files
Fixes #269824
Manually tested with local instance, it works