devpod icon indicating copy to clipboard operation
devpod copied to clipboard

Automatically install JetBrains IDE plugins listed in devcontainer.json

Open dubinsky opened this issue 1 year ago • 7 comments

Is your feature request related to a problem?

Yes: one of the advantages of using devpod and devcontainers is the ability to spin up pre-configured development environment for a repository; right now, while VSCode extensions needed can be described in the devcontainer.json file and installed automatically, JetBrains IDE plugins can not.

Which solution do you suggest?

After installing a JetBrains IDE, automatically install plugins listed in pre-determined location in the devcontainer.json file, for example:

"customizations" : {  
  "jetbrains" : {  
    "plugins" : ["org.intellij.scala"]
  }  
}

Which alternative solutions exist?
None that I know; my current work-around is:

Create a workspace, but do not start the IDE:

$ devpod up github.com/<user>/<workspace> --open-ide=false

Run the following script supplying the workspace name on the command line:

COMMAND="/home/vscode/.cache/JetBrains/RemoteDev/dist/intellij/bin/remote-dev-server.sh"  
PLUGINS="org.intellij.scala"  
devpod ssh $1 --command "$COMMAND installPlugins /workspaces/$1/ $PLUGINS"

(see: https://www.jetbrains.com/help/idea/work-inside-remote-project.html#plugins)

The command works, but results in:

Error tunneling to container: wait: remote command exited without exit status or exit signal

Start remote development in the workspace:

$ devpod up <workspace>

Additional context

Right now, after spinning up a workspace with code in - say - Scala with IntelliJ Idea, developer will either have to manually install the Scala plugin using the IDE's UI and restart the IDE or split the spin-up into three stages as in the work-around described above. Both approaches go against the spirit of devpod: start a fully configured development environment with one command (or one click); both require from the developer some additional actions and (even worse!) put on the developer some additional cognitive load needed to understand what those actions are.

Instead, all the actions required to obtain a working development environment should be automated and the decision what those actions are should reside in the code repository itself (side-by-side with the information on what tools have to be installed in the development environment).

It is true that the choice of the IDE to use belongs to the developer spinning up the workspace, but what plugins must be installed into the IDE chosen by the developer for it to be able to work with the code belong in the code.

As far as I understand, extensions to install in VSCode can indeed be listed in the devcontainer.json file; the same capability should exist for IntelliJ Idea.

Thank you!

P.S. There are some plugins that developer uses to customize the IDE (themes etc.); decision which plugins of this nature to install, regardless of the code repository underlying the workspace, does reside with the developer, and a facility to configure such plugins/extensions for automatic installation per IDE should be provided also (something like devpod ide set-options intellij -oPLUGINS="...").

dubinsky avatar Jul 10 '24 22:07 dubinsky

Hi @dubinsky, I'm with you there, DevPod should install these plugins automatically. Jetbrains is actively working on the details of their customization (#1, #2). For plugins it's going to be relatively straight-forward as you've already provided a command to do this, other customizations might be harder to implement from our side.

For the time being I'd attempt to install the plugins under the jetbrains.plugins key but no more until they've figured out how they are going to support devcontainers and we have clarity on the other fields

pascalbreuninger avatar Jul 12 '24 06:07 pascalbreuninger

@pascalbreuninger

For the time being I'd attempt to install the plugins under the jetbrains.plugins key but no more until they've figured out how they are going to support devcontainers and we have clarity on the other fields

Here, I am talking only about plugins, so this would be excellent if the ones listed under jetbrains.plugins got installed automatically! It would be very nice to include in the list of plugins to be installed, in addition to the ones listed in devcontainer.json, also the ones listed in the new option of the Idea IDE - "plugins"...

Thank you!!

dubinsky avatar Jul 12 '24 07:07 dubinsky

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Oct 30 '24 01:10 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Nov 29 '24 02:11 github-actions[bot]

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Feb 18 '25 01:02 github-actions[bot]

Although those youtrack issues are still open, it looks like there's now documentation stating this is supported? - https://www.jetbrains.com/help/pycharm/customizing-devcontainer-json-file.html

artis3n avatar Feb 22 '25 14:02 artis3n

https://youtrack.jetbrains.com/issue/IJPL-180043/Devcontainer-Applying-json-settings-customization-in-a-CDE

ggjulio avatar Mar 04 '25 08:03 ggjulio

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar May 04 '25 02:05 github-actions[bot]

This issue was closed because it has been inactive for 30 days since being marked as stale.

github-actions[bot] avatar Jun 04 '25 02:06 github-actions[bot]

Reopen ?

ggjulio avatar Jun 26 '25 14:06 ggjulio