Walked into my current gig and opened up a React component. First function: 2 spaces. Second function: 4 spaces. Third function: fucking tabs. Same file. Written by three different people over two weeks.
This is what happens when everyone just wings it with VS Code settings. Sarah's got Prettier installed. Jim's using some ancient Beautify extension he found in 2019. The new guy doesn't have any formatter at all - just raw-dogging his code and calling it done.
Code reviews become formatting arguments instead of actual code discussions. "Why are you using tabs?" "My settings say 4 spaces." "The project uses 2 spaces." "Since when?" Nobody knows because nobody wrote it down anywhere.
The Four Layers of Bullshit
VS Code has four different places to put settings. They override each other in the most confusing way possible:
- Default Settings - VS Code's built-in defaults
- User Settings - Your personal shit (the problem)
- Workspace Settings - Project settings in
.vscode/settings.json
- Folder Settings - Some multi-workspace nonsense nobody uses
Here's the issue: everyone focuses on workspace settings and ignores user settings. So you set up the project to use 2 spaces, but Jim has user settings that force 4 spaces. His code gets formatted wrong and he has no clue why.
Spent half a Friday debugging why one guy's PR looked completely different from everyone else's. Same formatter, same config file, but his tabs were fucked. Turns out he had "editor.tabSize": 8
in his user settings from some ancient project. The "error" message? "Inconsistent formatting." Thanks VS Code, super helpful.
Group Policy: The Nuclear Option
If you work at a place big enough to have Active Directory, you can force settings through Group Policy. Sounds great in theory. In practice, it's a pain in the ass to set up and half your developers will find ways around it anyway.
The main thing it's good for: stopping people from installing sketchy extensions. Found out last year that someone had installed a "productivity booster" extension that was mining crypto. Burned through three laptops before IT caught it.
You can also force basic settings like turning off telemetry and controlling updates. But honestly, if you can't get your team to agree on basic formatting without Group Policy, you have bigger problems.
{
"AllowedExtensions": {
"microsoft": true,
"esbenp.prettier-vscode": true,
"bracket-pair-colorizer": false
},
"UpdateMode": "manual"
}
The bracket pair thing is a perfect example of why this stuff matters. Half the team had the old extension installed, half were using the new built-in feature. Guess what happened when we upgraded? Everything broke for half the team. Could've been prevented if we'd just blocked the old extension from the start.
Stop Copying Settings Files Like It's 2005
The typical approach: "Hey new guy, just copy Bob's settings.json file." Six months later, everyone has completely different versions because people tweak their copies and nobody syncs back.
Better approach: workspace settings that everyone shares, plus personal overrides that don't get committed.
// .vscode/settings.json (shared, in git)
{
"editor.formatOnSave": true,
"editor.tabSize": 2,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
// .vscode/settings.local.json (personal, ignored by git)
{
"editor.fontSize": 14,
"workbench.colorTheme": "Dracula"
}
This way you enforce the stuff that matters (formatting) but let people have their own themes and font sizes without breaking the build.
Set this up at my last place. Onboarding went from "spend your first day configuring VS Code" to "git clone and you're done." New guys were actually writing code on day one instead of debugging why their editor was broken.
Extension Hoarders Are the Worst
Every team has that one guy who installs every extension he sees on Reddit. His VS Code takes 30 seconds to start and crashes when he opens a TypeScript file because there are three different TypeScript extensions fighting each other.
Meanwhile, some junior dev installs an auto-import extension that works great on his machine but adds imports to packages that don't exist in CI. Builds fail randomly and nobody can figure out why.
Easy fix:
// .vscode/extensions.json
{
"recommendations": [
"esbenp.prettier-vscode"
],
"unwantedRecommendations": [
"hookyqr.beautify"
]
}
This tells VS Code "suggest these extensions when someone opens the project" and "don't suggest these extensions because they suck."
Had a guy with 47 extensions once. VS Code was using 8GB of RAM and taking forever to start. Cleaned it up to 6 essential extensions and everything was fast again. Amazing what happens when you don't have 12 different JavaScript formatters running at the same time.
Settings Sync Will Fuck You
Settings Sync is great if you work alone. Turn it on and your VS Code looks the same on your laptop and desktop. Perfect.
Turn it on with a team and watch everything break. Someone enables sync, it syncs their personal workspace settings, and suddenly their formatting is different from everyone else's. They have no idea why.
The fix: only sync personal stuff. Themes, font sizes, keybindings. Don't sync anything that affects code formatting or project setup.
VS Code doesn't make this obvious, so people sync everything and then wonder why their team settings stopped working.
Actually Enforcing This Shit
Don't expect people to follow the rules just because you wrote them down. Half your team won't read the README, and the other half will ignore it.
Add a pre-commit hook that checks the settings file:
#!/bin/bash
if [ ! -f ".vscode/settings.json" ]; then
echo "Missing .vscode/settings.json"
exit 1
fi
if ! jq -e '.["editor.formatOnSave"] == true' .vscode/settings.json; then
echo "formatOnSave must be enabled"
exit 1
fi
Simple. If someone tries to commit without the right settings, their commit gets rejected. They'll fix it real quick.
The Multi-Platform Nightmare
Got Mac users, Windows users, and that one Linux guy who insists on using Arch? Your settings need to work everywhere.
The big gotcha: file paths. Windows uses backslashes, everyone else uses forward slashes. VS Code handles most of this automatically, but sometimes you need platform-specific settings:
{
"python.defaultInterpreterPath.windows": "${workspaceFolder}\\venv\\Scripts\\python.exe",
"python.defaultInterpreterPath.linux": "${workspaceFolder}/venv/bin/python",
"python.defaultInterpreterPath.osx": "${workspaceFolder}/venv/bin/python"
}
Most of the time, just use forward slashes and VS Code figures it out. Save the platform-specific stuff for when you actually need it.
Remote Development is a Pain
VS Code remote development is cool in theory. Edit files on a remote server like they're local files. In practice, half your extensions don't work remotely and the other half work differently.
Extensions that run in the UI (themes, keybindings) work fine. Extensions that need to access your files (linters, formatters) need to be installed on the remote machine too.
This means your carefully crafted local setup becomes useless when you connect to a server. You need separate extension lists for remote environments, and good luck keeping them in sync.
Bottom Line
VS Code configuration isn't rocket science, but it's easy to fuck up. Start simple: workspace settings for the stuff that matters, let people have their personal preferences for everything else. Add automation to enforce it, or people will ignore your rules.
Don't try to solve every edge case on day one. Get the basics right first, then add complexity when you actually need it.