Set the default IDE for new workspaces

Set the default editor that OpenShift Dev Spaces uses when creating new workspaces to ensure a consistent development experience. The default editor is specified by its plugin ID in the publisher/name/version format.

Before you begin

Procedure

  1. Determine the IDs of the available editors. An editor ID has the following format: publisher/name/version.
    oc exec deploy/devspaces-dashboard -n openshift-devspaces  \
        -- curl -s http://localhost:8080/dashboard/api/editors | jq -r '[.[] | "\(.metadata.attributes.publisher)/\(.metadata.name)/\(.metadata.attributes.version)"]'
  2. Configure the defaultEditor:
    oc patch checluster/devspaces \
        --namespace openshift-devspaces \
        --type='merge' \
        -p '{"spec":{"devEnvironments":{"defaultEditor": "<default_editor>"}}}'

    where:

    <default_editor>
    The default editor specified as a plugin ID in publisher/name/version format or as a URI.

Results

  • Create a new workspace from the OpenShift Dev Spaces Dashboard and verify that the configured default editor opens.