8

Is it possible to create different Visual Studio Code workspaces separately with extensions? For example, workspace_1 with a C++ extension and workspace_2 with a Python extension.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
JJJohn
  • 915
  • 8
  • 26

1 Answers1

17

You can install extensions and then enable/disable them on specific workspaces.

  1. Open a workspace

  2. From the Extensions panel, click on the gear icon of each extension

    • If it's enabled, you can disable it on this workspace

      Enter image description here

    • If it's disabled, you can enable it for this workspace

      Enter image description here

  3. Click on the three dots at the top-right to list either all enabled or disabled

    Enter image description here

There is unfortunately no way to configure this from settings.json file (user, workspace, or folder), as the extensions information does not seem to be stored there:

Enabled/Disabled extensions are not stored in workspace settings. Instead it is stored in local storage cache. You can manage them from the extensions view.

More information on Managing Extensions can be found in the Visual Studio Code documentation.

If you want to create a shareable list of extensions for specific workspaces (for example, perhaps to commit to source control or sharing with teammates), you can specify a list of recommended extensions per workspace.

  1. Open the command palette

  2. Enter Extensions: Configure Recommended Extensions (Workspace)

  3. Enter a list of extensions IDs

    • For example, you want to recommend the "Visual Studio Code Ruby" extension
      "extensions": {
          "recommendations": [
              "wingrunr21.vscode-ruby"
          ]
      }
      
    • The format is {publisherName}.{extensionName}
    • You can get this from the extension's page in Visual Studio Code Enter image description here
  4. When the user opens the workspace for the first time, they will be notified of recommended extensions to install.

    Enter image description here

    Enter image description here

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Gino Mempin
  • 25,369
  • 29
  • 96
  • 135