Adding a Visual Studio Code extension to a workspace
This section describes how to add a Visual Studio Code extension to a workspace using the workspace configuration.
-
The Visual Studio Code extension is available in the Che plug-in registry, or metadata for the Visual Studio Code extension are available. See Publishing metadata for a Visual Studio Code extension.
Adding a Visual Studio Code extension using the workspace configuration
-
A running instance of Che. To install an instance of Che, see Installing Che.
-
An existing workspace defined on this instance of Che.
-
The Visual Studio Code extension is available in the Che plug-in registry, or metadata for the Visual Studio Code extension are available. See Publishing metadata for a Visual Studio Code extension.
To add a Visual Studio Code extension using the workspace configuration:
-
Click the Workspaces tab on the Dashboard and select the plug-in destination workspace.
The Workspace <workspace-name> window is opened showing the details of the workspace.
-
Click the devfile tab.
-
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
-
Restart the workspace for the changes to take effect.
Adding a Visual Studio Code extension using recommendations
-
A running instance of Che. To install an instance of Che, see Installing Che.
-
Featured Visual Studio Code extensions are available in the Che plug-in registry.
Open a workspace without any existing devfile using the Che dashboard:
The recommendations plug-in will scan files, discover languages and install Visual Studio Code extensions matching these languages.
Disable this feature by setting extensions.ignoreRecommendations
to true in the devfile attributes.
The recommendations plug-in can suggest Visual Studio Code extensions to install when opening files. It suggests extensions based on the workspace content, allowing the user to work with the given files.
Enable this feature by setting extensions.openFileRecommendations
to true in the devfile attributes.