Scala Plugin for IntelliJ IDEA
Plugin that implements Scala, sbt, Play 2, SSP and Hocon support in IntelliJ IDEA.
To get information about how to install and use this plugin in IDEA, please use IntelliJ IDEA online help.
If you have any question about the Scala plugin, we'd be glad to answer it in our developer community.
If you found a bug, please report it on our issue tracker.
If you want to contribute, please see our intro to the Scala plugin internals.
Setting up the project
In order to take part in Scala plugin development, you need:
- IntelliJ IDEA 2020.1 or higher with a compatible version of Scala plugin
- JDK 8
- (optional but recommended) Enable "internal mode" in IDEA
- Clone this repository to your computer
$ git clone https://github.com/JetBrains/intellij-scala.git
Open IntelliJ IDEA, select
File -> New -> Project from existing sources, point to the directory where the Scala plugin repository is and then import it as sbt project.
In the next step, select JDK 8 as project JDK (create it from an installed JDK if necessary).
scalaCommunityrun configuration and select the
Debugbutton to build and start a development version of IDEA with the Scala plugin.
Browsing IntelliJ platform sources
When loading the plugin in sbt, the IntelliJ platform is downloaded to
IntelliJ platform sources should automatically attach after project has been imported and indices have been built.
However, if this didn't happen, and if you're seeing decompiled code when opening a platform API class you can click
the option "attach sources" at the top of the editor, navigate to the sdk directory and select
then choose "All".
To run tests properly, the plugin needs to be packaged. On the sbt shell:
The "fast tests" can take over an hour. To get a quick feedback on project health, run only the type inference tests:
GitHub Actions build
The project is configured to build and run the typeInference tests and fast tests with Github Actions. The full test suite isn't run to avoid really long build times.
Running the plugin
The easiest way to try your changes is typically to launch the
scalaCommunity run configuration which is created
when you set up the project as described above.
As a standalone plugin
To run and distribute a modified version of the plugin in a regular IntelliJ instance, you need to package it.
- on the sbt shell, run
packageArtifactZip. This will output the generated plugin zip location (typically into
- In IntelliJ, open Preferences, section Plugins, choose "Install plugin from disk..." and navigate to the scala-plugin.zip
- Restart IntelliJ