If you’re working in a team where the project has a shared .vscode/settings.json
file that’s checked into version control, you’ve probably hit the same problem I did: you want your own VS Code preferences (like Peacock colors) without touching the team-shared settings.
There’s a nice way around this, using multi-root workspaces.
The Problem
Let’s say your repo has this:
my-project/ .vscode/ settings.json ← in version control
Every time you tweak a setting like the Peacock color, VS Code tries to update this file. And then Git shows a dirty diff you don’t want to commit. 😩
The Goal
We want to keep the repo’s .vscode/settings.json
exactly as it is — but add our own override settings just for us, like:
- Custom Peacock color for this project
- Font size tweaks
- Maybe your own formatter rules
And we want VS Code to use those local settings without interfering with version-controlled files.
The Solution
To fix this we need to take advantage of a VSCode feature called Multi-Root Workspaces.
- Open the folder normally in VS Code
Open your project as usual in VS Code (File > Open Folder or from terminal).
- Convert to a workspace
From the menu:
-
File > Add Folder to Workspace…
-
Re-add the current folder (yes, even though it’s already open)
-
Now go to File > Save Workspace As…
-
Save it next to your project, e.g.:
my-project.code-workspace
You’ve just created a workspace file.
- Add workspace-level settings
Open your new my-project.code-workspace
file, and it should look something like this:
{ "folders": [ { "path": "my-project" } ], "settings": { // your local overrides can go here }}
These settings apply only when this workspace is open.
You can now add anything you want here without touching the repo’s .vscode/settings.json
.
- Set your own Peacock color (finally!)
Let’s say you want to set a specific Peacock color for this workspace. Add this inside the settings section:
"peacock.color": "#7744dd"
And now every time you open the my-project.code-workspace
file, VS Code will light up your workspace with your own custom Peacock color.
How to Open the Workspace in the Future
Instead of opening the project folder directly, open the my-project.code-workspace
file:
File > Open Workspace…
Or open it from your “Open Recent…” in VS Code
You’ll know it’s working if you see the folder name under a “Workspace” heading in the Explorer sidebar.
One Gotcha to Watch For
If your team is using settings in .vscode/settings.json
that conflict with your own, VS Code merges them, but project-level settings win. That means you can’t override everything this way.
But for Peacock colors, UI tweaks, and things like excluded files or experimental extensions, it works great.
Recap
- Multi-root workspaces let you create a
.code-workspace
file that wraps your project. - You can use this to define your own settings that don’t touch version-controlled files.
- It’s perfect for tools like Peacock, local-only extensions, and developer-specific overrides that aren’t included in the shared
settings.json
Thanks for reading! 💜