Skip to content

Customizing VS Code with settings.json

Everything you change in VS Code’s Settings screen ends up as a key in a JSON file. Knowing where those files are and how they override each other lets you keep per-project settings in git, set different rules for different languages, and copy your setup between machines.

  • Settings UI: Ctrl+, (Windows/Linux) or Cmd+, (macOS). Search for a setting by name and change it. There’s no save button; changes apply immediately. (When you edit settings.json directly, changes apply when you save the file.)
  • settings.json: open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run Preferences: Open User Settings (JSON). You can also click the “Open Settings (JSON)” icon at the top right of the Settings UI.

VS Code has two main scopes:

ScopeFileApplies to
User%APPDATA%\Code\User\settings.json (Windows), ~/Library/Application Support/Code/User/settings.json (macOS), ~/.config/Code/User/settings.json (Linux)Every folder you open
Workspace.vscode/settings.json in the projectOnly that project

Workspace settings override user settings. That makes .vscode/settings.json the place for project rules you want everyone to share, such as formatter and tab size, and the user file the place for personal taste like font and theme.

A user settings.json might look like this:

{
"editor.fontSize": 14,
"editor.rulers": [80, 120],
"files.autoSave": "onFocusChange",
"workbench.colorTheme": "Default Dark Modern"
}

And a project’s .vscode/settings.json:

{
"editor.tabSize": 2,
"editor.formatOnSave": true,
"files.exclude": {
"**/node_modules": true,
"**/dist": true
}
}

The file is JSON with comments (JSONC), so // comments are allowed.

Wrap settings in a "[languageId]" key to apply them to one language only:

{
"[python]": {
"editor.tabSize": 4,
"editor.formatOnSave": true
},
"[markdown]": {
"editor.wordWrap": "on"
}
}

The language ID is shown in the status bar’s language picker. You can also run Preferences: Configure Language Specific Settings… from the Command Palette.

Open the Extensions view with Ctrl+Shift+X (Cmd+Shift+X on macOS), search, and click Install. Most extensions add their own settings, which show up in the Settings UI under the extension’s name.

To suggest extensions to everyone working on a repository, add .vscode/extensions.json:

{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}

VS Code prompts people to install these when they open the folder. The ID is shown on each extension’s Marketplace page.

Click in the gutter left of a line number to set a breakpoint, then open Run and Debug (Ctrl+Shift+D / Cmd+Shift+D) and press F5. For anything beyond running the current file, click “create a launch.json file”; the debug configurations are stored in .vscode/launch.json, which can be committed alongside settings.json.

Settings Sync (the account icon in the bottom left, or Settings Sync: Turn On… in the Command Palette) syncs your user settings, keybindings, snippets and extensions through a GitHub or Microsoft account. Workspace settings aren’t synced, since they live in the project.

© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)