Skip to content

Add local workspace settings targets - #1

Open
snickell wants to merge 12 commits into
mainfrom
seth/local-workspace-settings-targets
Open

snickell wants to merge 12 commits into
mainfrom
seth/local-workspace-settings-targets

Conversation

@snickell

@snickell snickell commented Apr 10, 2026 •

Copy link
Copy Markdown
Owner

See #5 for all approaches to this problem, this is Approach 4 - First-Class Local Targets.

This PR adds support for: .vscode/{settings,tasks,launch,extensions}.local.json and corresponding *.code-workspace.local sections as first-class workspace targets with separate provenance, inspect semantics, and editing paths.

Related to microsoft#40233.
Related to microsoft#282806.

Local workspace configuration files can exist as separate files today, but they are not represented as distinct configuration targets. Inspect results, write routing, settings UI where applicable, and file editing behavior therefore treat them as shared workspace state or loader-specific overlay state.

Example:

// .vscode/settings.json
{
  "editor.tabSize": 2
}
// .vscode/settings.local.json
{
  "workbench.colorCustomizations": {
    "titleBar.activeBackground": "#1f6feb"
  }
}
// .vscode/tasks.local.json
{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "local build",
      "type": "shell",
      "command": "npm run build:local"
    }
  ]
}

With this change, the local files are separate targets. The shared files remain shared workspace state. The local files remain local workspace state.

This PR adds explicit local workspace targets for folder workspaces and saved workspaces across the local workspace file family.

  • add WORKSPACE_LOCAL and WORKSPACE_FOLDER_LOCAL to the configuration model and inspect surfaces
  • load, watch, and write .vscode/{settings,tasks,launch,extensions}.local.json and corresponding *.code-workspace.local sections as distinct local layers
  • expose those local layers through configuration editing, preferences services, commands, settings UI where applicable, and ext-host inspect data
  • register schema, JSONC, and completion support for the local workspace file family where applicable
  • add coverage for platform, workbench, editing, ext-host, configuration editing, and descriptor-backed file-family behavior

Alternative Approaches

Internal name PR Mechanism Stronger where this is weaker Weaker where this is stronger
1 - Single Sidecar Overlay PR #2 .vscode/settings.local.json smaller patch, narrower scope no separate targets, no file-family coverage
3 - Parallel Overlay Folder PR #3 .vscode.local/{settings,tasks,launch,extensions}.json smaller patch, broader file coverage without target-model changes no separate inspect semantics or editing-path distinction
5 - General Config Composition PR #4 {settings,tasks,launch,extensions}.json can call extends to pull in other {settings,tasks,launch,extensions}.*.json files closest to current upstream inheritance work, less product-facing indirect for dedicated local workspace state, does not model local values as separate targets

Pros:

  • preserves separate provenance and inspect semantics across the local workspace file family
  • gives local files explicit write paths and settings UI/editing behavior where applicable
  • covers both folder workspaces and saved workspaces

Cons:

  • largest change of the four
  • affects configuration targets, UI, and API surface
  • more product-sensitive than file-only approaches

snickell added 11 commits April 9, 2026 18:24
…settings-targets

# Conflicts:
#	AGENTS.md
#	extensions/configuration-editing/package.json
#	src/vs/platform/configuration/common/configuration.ts
#	src/vs/platform/configuration/common/configurationModels.ts
#	src/vs/platform/configuration/test/common/configurationModels.test.ts
#	src/vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider.ts
#	src/vs/workbench/contrib/extensions/test/electron-browser/extensionRecommendationsService.test.ts
#	src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts
#	src/vs/workbench/contrib/preferences/browser/preferencesEditor.ts
#	src/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts
#	src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts
#	src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts
#	src/vs/workbench/contrib/preferences/common/preferencesContribution.ts
#	src/vs/workbench/services/configuration/browser/configuration.ts
#	src/vs/workbench/services/configuration/browser/configurationService.ts
#	src/vs/workbench/services/configuration/common/configuration.ts
#	src/vs/workbench/services/configuration/common/configurationEditing.ts
#	src/vs/workbench/services/configuration/common/configurationModels.ts
#	src/vs/workbench/services/configuration/test/browser/configurationEditing.test.ts
#	src/vs/workbench/services/configuration/test/browser/configurationService.test.ts
#	src/vs/workbench/services/configuration/test/common/configurationModels.test.ts
#	src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.ts
#	src/vs/workbench/services/preferences/browser/preferencesService.ts
#	src/vs/workbench/services/preferences/common/preferences.ts
#	src/vscode-dts/vscode.d.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant