VS Code Settings
VS Code is highly customizable due to the extent of changeable settings. Settings in VS Code allow you to modify almost all aspects, including the editor’s appearance, code formatting, and other behaviors. There are two different scopes for settings:
- User settings apply to all your VS Code sessions.
- Workspace settings are stored inside a workspace (folder) and are only active when the Workspace is open.
This page covers some of the types of settings in VS Code and how to edit them. For setting recommendations please refer to Recommended Settings and Extensions.
Types of settings
User settings
Users can modify settings from the Settings editor or directly edit settings.json files.
Settings editor
To modify the settings using the Settings editor, click the Manage gear icon and select Settings.
When utilizing the Settings editor, either of the first two tabs can change User settings:
User
Remote [<
SERVER_ADDRESS:PORT
>]SERVER_ADDRESS
is your actual Posit Workbench server address and the port it is using.
{fig-alt=“VS Code settings UI tabs”}
Editing the JSON file
All user settings are specified in a settings.json
file. You can customize these settings by editing the settings.json file directly or using the Settings editor.
To edit settings.json, utilize the Command Palette:
- Cmd + Shift + P for macOS or Ctrl + Shift + P for Windows
- Then, type: “Preferences: Open User Settings (JSON)”
Workspace Settings
Each Workspace setting is specified in .vscode/settings.json
within the workspace folder.
Workspace settings mirror User settings but take precedence when you open a Workspace. You can change the settings by:
- Editing the JSON file or
- Using the Settings editor and selecting the Workspace tab.