How To

Customize VSCode workspaces

VSCode

The following configuration files can be added to a user's profile to define the editor configuration that each workspace will start with.

settings.json

This file is the same settings.json you would normally have in VSCode but the location of the file is limited in OpenVSCode. The file can be copied from a local instance of VSCode or a workspace IDE that you've set with your desired config.

E.g. Path: /home/project/.vscode/settings.json

{
  "workbench.colorTheme": "Tomorrow Night Blue",
  "files.autoSave": "off"
}

extensions.txt

Here you can list extensions that you'd like pre-installed into each workspace. To get a list of extensions from a workspace, open a terminal in the IDE and run openvscode-server --list-extensions. The output of that command should be the contents of this file. Extensions from a local version of VSCode can be listed with code --list-extensions.

In OpenVSCode, some extensions can only be installed from within the browser, these most likely will be omitted from the list extensions command output.

E.g. Path: /home/project/.vscode/extensions.txt

ms-python.python
ms-toolsai.jupyter
svelte.svelte-vscode

extensions.json

This file is used to set workspace recommended extensions. When starting a new workspace all recommended extensions can be installed with a single click. This is especially useful for any extensions that cannot be pre-installed (see: extensions.txt).

E.g. Path: /home/project/.vscode/extensions.json

{
  "recommendations": ["vscodevim.vim", "ms-python.python"]
}

keybindings.json

This file is used to create custom keybindings in your VSCode workspace. This is useful if you would like to overwrite the Default Keyboard Shortcuts.

E.g. Path: /home/project/.vscode/keybindings.json

// Place your key bindings in this file to override the defaults
[
  {
    "key": "cmd+p",
    "command": "workbench.action.showAllSymbols"
  },
  {
    "key": "ctrl+t",
    "command": "-workbench.action.showAllSymbols"
  },
]
Previous
Create subdomains for tenants within my application