vs.code: playing well with others
I very much like my idiosyncratic coding setup with proportional fonts and automatic code formatting in VS.Code. But it doesn’t play well with others. Every time I save a file it completely reformats it in my preferred way. Not popular at pull request parties.
Making per-workspace settings that are more collaboration friendly is very easy thanks to VS.Code’s flexible settings. It basically boils down to creating a .vscode/settings.json file in the project workspace with a few settings to override the weird ones I have. By far the most important is “format on save”; the others just make my display fixed width like most people’s so I see what they’re seeing. Here’s the overrides I have in my workspace settings:
{
"editor.fontFamily": "Consolas",
"editor.letterSpacing": 0.0,
"editor.tabSize": 4,
"editor.formatOnSave": false,
}