Two places to configure your editor
You need a desktop installation of Visual Studio Code and a folder you can open as a project. The examples below use the Settings editor and standard settings keys; menu wording may differ slightly by operating system or VS Code version.
User settings are your personal defaults. They apply across the folders and workspaces you open, unless a more specific setting overrides them. A font size that is comfortable on your screen, for example, usually belongs in user settings.
Workspace settings apply to the project you currently have open. In a single-folder workspace, VS Code stores them in .vscode/settings.json inside that folder. They can help everyone working in the same project use a consistent editing setup, provided the file is included when the project is shared. Think of user settings as “how I like to work” and workspace settings as “how we work on this project.”
Which value takes effect?
For a basic setting, VS Code starts with its default value. Your user setting can replace that default, and a workspace setting can replace your user setting for the open project. Suppose your user settings specify an editor tab size of four spaces, while the workspace specifies two. In that workspace, the tab size is two; in another project without an override, your personal value of four still applies.
A workspace settings file could contain { "editor.tabSize": 2, "editor.formatOnSave": true }. The first entry sets the tab size for that workspace. The second asks VS Code to format files on save when a suitable formatter is available. It does not install a formatter or guarantee that every file type can be formatted.
There are further levels of specificity. Settings can target a particular language, and a multi-root workspace can have settings for individual folders. Those cases may affect which value wins for a given file. If the result surprises you, find the setting in VS Code’s Settings editor and inspect its available scopes and overrides rather than assuming one value applies everywhere. Some settings cannot be changed at workspace scope at all.
How to edit each scope
Open Settings with Ctrl+, on Windows or Linux, or Cmd+, on macOS. You can also open it from the application menu. With a folder open, choose the User or Workspace tab before changing a value. The tab matters: searching for a setting is not the same as deciding where to save it.
If you prefer editing a settings file, open the Command Palette and run “Preferences: Open User Settings (JSON)” or “Preferences: Open Workspace Settings (JSON).” The workspace command lets you edit the settings associated with the open workspace. For a single-folder project, the project file is .vscode/settings.json. You can create that file through VS Code if it does not exist yet.
A multi-root workspace is different: it groups several folders using a .code-workspace file. Workspace-wide settings can live in that file, while an individual folder may also have its own .vscode/settings.json. If a setting seems to behave differently between folders, check both places. Before editing a shared configuration, confirm that you are changing the intended workspace rather than a similarly named folder elsewhere on your computer.
Choose settings that travel well
Put preferences tied to your own display or habits in user settings: editor font size, color theme, or how much interface detail you like to see. Consider workspace settings for choices that help people edit the project consistently, such as a tab size agreed on by the team. Do not put a machine-specific path in a shared workspace file unless everyone who uses the project can reasonably use that path.
Because .vscode/settings.json lives inside a single-folder project, it may be committed to version control along with the code. Review its changes before sharing it. A workspace setting can override a teammate’s user preference, which is useful for project conventions but frustrating when the setting is merely someone else’s personal taste.
When diagnosing an unexpected editor behavior, follow a short checklist: identify the affected file, find the setting in the Settings editor, check whether a workspace value is present, and then look for language-specific or folder-specific overrides if needed. Removing an unnecessary override lets the less specific setting take effect again. That makes the configuration easier to understand than adding another setting to counteract it.



