Adding a VS Code extension to a workspace

This section describes how to add a VS Code extension to a workspace using the Che Plugins panel or the workspace configuration.

Prerequisites

Adding a VS Code extension using the Che Plugins panel

Prerequisites
Procedure

To add a VS Code extension using the Che Plugins panel:

  1. Open the Che Plugins panel by pressing CTRL+SHIFT+J or navigate to View/Plugins.

  2. Change the current registry to the registry in which the VS Code extension was added.

  3. In the search bar, click the Menu button and then click Change Registry to choose the registry from the list. If the required registry is not in the list, add it using the Add Registry menu option. The registry link points to the plugins segment of the registry, for example: https://my-registry.com/v3/plugins/index.json.

  4. To update the list of plug-ins after adding a new registry link, use Refresh command from the search bar menu.

  5. Search for the required plug-in using the filter, and then click the Install button.

  6. Restart the workspace for the changes to take effect.

Adding a VS Code extension using the workspace configuration

Prerequisites
Procedure

To add a VS Code extension using the workspace configuration:

  1. Click the Workspaces tab on the Dashboard and select the workspace in which you want to add the plug-in. The Workspace <workspace-name> window is opened showing the details of the workspace.

  2. Click the devfile tab.

  3. Locate the components section, and add a new entry with the following structure:

     - type: chePlugin
       id:              (1)
    1 ID format: <publisher>/<plug-inName>/<plug-inVersion>

    Che automatically adds the other fields to the new component.

    Alternatively, you can link to a meta.yaml file hosted on GitHub, using the dedicated reference field.

     - type: chePlugin
       reference:              (1)
    1 https://raw.githubusercontent.com/<username>/<registryRepository>/v3/plugins/<publisher>/<plug-inName>/<plug-inVersion>/meta.yaml
  4. Restart the workspace for the changes to take effect.