Skip to content

Support .code-workspace.local files for untracked local setting overrides #282806

Description

Feature Request: Support for .code-workspace.local files to allow untracked local setting overrides

Problem

When working with multi-root workspaces in a team environment, there's no clean way to have:

  1. Shared workspace settings tracked in Git (.code-workspace file)
  2. Personal settings that vary per checkout and shouldn't be committed

Common use case: Developers working on multiple checkouts of the same project in parallel want different workbench.colorCustomizations (window/titlebar colors) per checkout to visually distinguish them. These colors are personal preferences and shouldn't pollute the shared workspace configuration.

Current Workarounds (all problematic)

Workaround Problem
git update-index --skip-worktree Fragile, breaks on pulls, doesn't work with sparse checkouts
Git clean/smudge filters Complex setup, local settings lost on pulls
User settings Global, can't vary per checkout
Duplicate workspace files Loses upstream improvements to the shared workspace file
Gitignore the workspace file Loses ability to share folders, tasks, launch configs with team

Proposed Solution

Support a *.code-workspace.local file that VS Code automatically discovers and merges with the main workspace file.

File structure:

myproject.code-workspace        # Tracked in Git - shared team config
myproject.code-workspace.local  # Gitignored - personal overrides

Example myproject.code-workspace (tracked):

{
  "folders": [
    { "path": "." },
    { "path": "../shared-lib" }
  ],
  "settings": {
    "editor.formatOnSave": true,
    "typescript.preferences.importModuleSpecifier": "relative"
  },
  "extensions": {
    "recommendations": ["esbenp.prettier-vscode"]
  }
}

Example myproject.code-workspace.local (gitignored):

{
  "settings": {
    "workbench.colorCustomizations": {
      "titleBar.activeBackground": "#dd0531",
      "titleBar.activeForeground": "#ffffff",
      "statusBar.background": "#dd0531",
      "activityBar.background": "#fa1b49"
    },
    "peacock.color": "#dd0531"
  }
}

Merge Behavior

Section Behavior
settings Deep merge, local values override shared values
folders Not overridable (would break workspace structure)
extensions.recommendations Merge arrays (local additions only)
tasks Optional: merge task arrays (local additions)
launch Optional: merge configuration arrays (local additions)

Benefits

  • Clean separation of shared vs personal settings
  • No Git workarounds required
  • Zero configuration - just create the .local file
  • Follows established patterns from other tools:
    • .env / .env.local
    • docker-compose.yml / docker-compose.override.yml
    • tsconfig.json with extends
  • Backward compatible - purely additive, no breaking changes

Additional Considerations

  1. Default .gitignore templates should include *.code-workspace.local
  2. Settings UI could show which settings come from the local file (similar to how it shows user vs workspace settings)
  3. Command Palette command: "Open Local Workspace Settings" to create/edit the .local file

Related Discussions

  • Stack Overflow: Extending settings.json in VSCode - 50+ upvotes asking for this functionality
  • Many blog posts document Git workarounds, indicating strong community demand
  • Similar request exists for .vscode/settings.local.json in single-folder workspaces

Activity

  1. sebmarchand commented on Dec 11, 2025

    @sebmarchand
    Author

    I'm fine helping with the implementation of this but I'd like to get some feedback on the overall idea.

    I think that the main challenge will be to figure out how this will integrate with the settings UI etc, but it also feels like something that could just work via a .local file for now without a UI integration?

  2. sebmarchand commented on Dec 11, 2025

    @sebmarchand
    Author

    Bhavya U (@bhavyaus) I'm taking a stab at this in #282854 (for fun, no worries if it can't be merged for xyz reasons)

  3. added
    feature-request
    workbench-multiroot
    and removed on Dec 11, 2025
  4. bpasero commented on Dec 11, 2025

    @bpasero
    Contributor
  5. vs-code-engineering commented on Dec 11, 2025

    @vs-code-engineering
    Contributor

    This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  6. spartanatreyu commented on Dec 12, 2025

    @spartanatreyu

    I'm not sure about one of the problems you listed:

    Workaround Problem
    [...] [...]
    Gitignore the workspace file Loses ability to share folders, tasks, launch configs with team

    I'm not sure I see what the problem is since a file can still be staged and committed into git even when it exists in a .gitignore file.


    You would start like this:

    1. Create the base workspace settings file that everyone should have
    2. Stage and commit the workspace settings file to git
    3. Add it to the .gitignore file
    4. Stage and commit the .gitignore changes to git.
    5. Push changes.

    Now whenever someone loads the project, the settings file is pulled down and applied to vscode.

    A user or extension (like the Window Colors extension in your example) can make their own local changes to the workspace setting file and they will not appear as a change in git.


    Then you would do this when new global changes need to be added:

    1. Make changes to the workspace settings file
    2. Stage only the lines that you want everyone to get
      For instance, staging:
      - "files.readonlyInclude": {...} (Marking a folder as read-only)
      - "search.exclude": {...} (Excluded a folder from search results)
      - "cSpell.words": [...] (Adding a list of approved words to a spell checking extension)
      But not staging:
      - "workbench.colorCustomizations": {...} (Local color theme settings set by the Window Colors extension)
    3. Commit and push the changes

    The person who made the new changes still has their local changes since they didn't stage or discard them.

    New users on the project get the new version of the workspace settings without the other user's local changes.

    Existing users who were on the original workspace settings with their own local changes (e.g. window color settings) can do a pull rebase (i.e. git pull --rebase or whatever your git client of choice calls it) to rewind their local changes to the settings file, pull down the latest changes, then replay their local changes on top of them.


    As far as I can tell, global and independent local changes already work with git in the one file.

    Was there something I missed?

  7. added
    config
    on Dec 12, 2025
  8. sandy081 commented on Dec 12, 2025

    @sandy081
    Member

    Related - #40233

  9. sebmarchand commented on Dec 12, 2025

    @sebmarchand
    Author

    Thanks for the link Sandeep Somavarapu (@sandy081) ! I actually found a similar ticket, #37519 (comment), and decided to open this one instead because this ticket and the one you linked here are for local settings override in project files and you mentioned that the solution should/could come from Workspace instead (that's why I'm making this issue focused on .code-workspace files). These tickets show that there's a strong interest for that kind of functionality, and my PoC in #282854 seems to show that it's not that tricky to support. The devil is in the details of course, and anything related to config changes can quickly become quite involved. But if feels like in this case a basic solution (with no UI changes) would be sufficient?

    Jayden Pearse (@spartanatreyu) yes, your approach totally works! Thanks for taking the time to make it so clear! It's just that it feels extremely cumbersome to do this, it feels more like a stopgap than a real solution.

  10. jtran commented on Dec 13, 2025

    @jtran
  11. vs-code-engineering commented on Dec 16, 2025

    @vs-code-engineering
    Contributor

    🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  12. damianpowell commented on Jan 6, 2026

    @damianpowell

    🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

    Hey, @vs-code-engineering, how about #15909? It is similar and has received about 40x as many upvotes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    configfeature-requestworkbench-multiroot

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions