On this page
A repository can pass every test and still be frustrating to edit. One developer saves two-space indentation, another saves four, and a third has an extension that silently reorganizes imports. Shared editor configuration should remove those accidental differences without turning the repository into a copy of one person's laptop.
Decide what belongs in the workspace
Start with repository behavior, not appearance. Formatting, file associations, and language-specific defaults can affect the files everyone reviews. Theme, font size, cursor animation, and keyboard shortcuts usually belong in user settings. Make that boundary explicit before committing a configuration directory.
Use the JSON formatter to inspect a sanitized, strict-JSON configuration fragment and spot misplaced brackets. VS Code settings files support JSON with comments, so comments and trailing commas accepted by the editor may need removal before using a strict JSON tool. A formatter check is not a substitute for checking whether a setting exists.
Choose one representative source file, one Markdown document, and one configuration file as the setup trial. These reveal conflicting formatters much faster than opening a large repository and hoping the defaults agree. Keep the first change small enough that another developer can explain every setting.
Establish formatter ownership explicitly
A workspace should identify the default formatter for each language that actually needs one. Avoid installing several formatters and relying on extension activation order. Read the VS Code settings documentation for how user, workspace, and language-specific settings interact.
{
"editor.formatOnSave": true,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true
}Save this as a reviewed workspace settings file rather than distributing it through chat. The example assumes the Prettier extension is approved and the repository has its own formatter configuration. It does not select a universal style or install the extension automatically.
Check Markdown before enabling whitespace trimming everywhere. Two trailing spaces can represent a hard line break, and some projects intentionally use that syntax. A language override or formatter policy may be more appropriate than a blanket edit. Test the actual files your documentation system renders.
Keep formatting preferences in the formatter's own configuration when possible. An editor-specific print width and a different command-line print width create alternating diffs. The editor should invoke the repository convention, not become a competing source of truth.
Recommend extensions without assuming installation
Commit extension recommendations separately from settings. Recommendations are onboarding hints; they are not an enforcement mechanism and should not be described as mandatory installation. A developer may use another editor while producing exactly the same output.
Use an extensions file containing only tools with a concrete role: the chosen formatter, the repository's linter integration, and perhaps a framework language service. Link their purpose from the contributor guide. Avoid a sprawling bundle of themes, duplicate completion providers, and experimental assistants that request additional access.
The VS Code workspace guide explains folder workspaces and multi-root workspaces. In a multi-root repository, confirm which folder owns each setting and task. An extension that works at the top level may not discover a package-local configuration in the same way.
When teammates report inconsistent behavior, compare extension versions and the formatter output channel before changing the shared file. A disabled extension or a missing local dependency can look like a settings precedence bug. Record the failing language mode as well: a file detected as plain text will not use TypeScript-specific settings.
Verify the setup on a clean checkout
Treat save behavior as something testable. Open the trial files, introduce a harmless spacing change, save, and inspect the diff. Then run the repository's documented formatter check from the terminal. Both routes should agree on the same bytes.
Use a disposable branch for this exercise. Do not mix a repository-wide formatting change with workspace configuration unless that migration is the explicit purpose of the pull request. A small diff makes it easier to determine whether the editor settings are genuinely helpful.
For a new teammate, document these steps in order: install the supported runtime, install dependencies using the lockfile, open the correct folder, inspect recommendations, and run the formatting check. The broader development resources are useful background, but the repository must contain its own exact commands.
If the check fails only after saving, inspect configuration discovery. A formatter may find a parent-directory configuration, use a bundled version, or ignore a package because the file matches an exclusion pattern. Capture the resolved formatter path rather than simply reinstalling everything.
Also test an intentionally excluded generated file. Automatic rewriting of snapshots, vendored code, or generated clients can create difficult review noise. Exclusions should match the command-line policy, not merely hide files from the editor sidebar.
Maintain a small, explainable configuration
Assign configuration ownership to the people maintaining developer experience, with ordinary code review for changes. Every added setting should answer a real problem: which files it affects, why the default was insufficient, and how contributors can verify the outcome.
Use Prettier's configuration documentation when deciding where style belongs. Workspace settings should usually select the integration; repository configuration should determine the output. That separation also helps contributors using terminal editors.
Audit the workspace file after major extension upgrades. Remove obsolete settings rather than accumulating compatibility switches indefinitely. For unrelated structured snippets encountered during the audit, the JSON-to-TypeScript tool can help inspect shapes, but generated types do not validate editor configuration keys.
Keep personal preferences out of review arguments. If a setting changes no shared files and has no security or workflow implication, leaving it local is usually simpler. Conversely, any extension that executes project code deserves scrutiny before team-wide recommendation, especially when opening unfamiliar repositories.
Finish the pull request with a short before-and-after example and the command used to check it. A reviewer should be able to reproduce the benefit without installing your entire editor profile. That is a more durable onboarding artifact than a screenshot of a preferred setup.
Key takeaways
- Share output-affecting defaults, not an entire personal editor profile.
- Give each language one formatter and keep style in repository configuration.
- Test editor saves against the command-line check on representative files.
- Keep recommendations minimal and review settings changes like other tooling changes.
Reach designers & developers at work
Put your product next to the tools people use every day. One sponsor per placement, no tracking pixels.
Become a sponsor