Skip to content
Scala plugin for IntelliJ IDEA
Branch: idea191.x
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea added project icon Mar 6, 2019
bsp ScalaLanguageLevel is a java enum #SCL-15156 Mar 22, 2019
project update sbt-idea-plugin to 2.3.2 Mar 20, 2019
scala classes inlined #SCL-15156 Mar 22, 2019
travis
.gitattributes
.gitignore
.java-version
.jvmopts remove deprecated ApplicationComponent usages, Sep 6, 2018
.travis.yml
CONTRIBUTING.md misc Mar 6, 2019
LICENSE.txt misc Mar 6, 2019
README.md misc Mar 6, 2019
build.sbt worksheet module added #SCL-15012 Mar 21, 2019

README.md

official JetBrains project TC Build Status Travis Build Status Gitter

Scala Plugin for IntelliJ IDEA

Plugin that implements Scala, sbt, Play 2, SSP and Hocon support in IntelliJ IDEA.

General information

Setting up the project

In order to take part in Scala plugin development, you need to:

  1. Install IntelliJ IDEA 2017.1 or higher with a compatible version of Scala plugin

  2. Fork this repository and clone it to your computer

$ git clone https://github.com/JetBrains/intellij-scala.git
  1. Open IntelliJ IDEA, select File -> New -> Project from existing sources, point to the directory where Scala plugin repository is and then import it as sbt project.

  2. When importing is finished, in order to get artifacts and run configurations for IDEA project, go to the Scala plugin repo directory and run

$ git checkout .idea
  1. Open "sbt shell" tool window
  • run createIDEAArtifactXml task
  1. Select the IDEA run configuration and select the Run or Debug button 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 <home>/.ScalaPluginIC/sdk/<sdk version>/. When opening a platform API class you will see the option to "attach sources". Click it, navigate to the sdk directory and select sources.zip, then choose "All".

Tests

To run tests properly, the plugin needs to be packaged. On the sbt shell:

  1. packagePluginCommunity
  2. runFastTests

The "fast tests" can take over an hour. To get a quick feedback on project health, run the "typeInference tests"

> testOnly org.jetbrains.plugins.scala.lang.typeInference.*

Travis CI

The project is configured to build and run the typeInference tests with Travis CI, which you can enable in your forks. The full test suite can't currently be run because Travis doesn't allow builds to take that long.

Running the plugin

Debugging mode

The easiest way to try your changes is typically to launch the IDEA 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.

  1. on the sbt shell, run packagePluginZip. This will output the generated plugin zip location (typically into <project directory>/target/scala-plugin.zip).
  2. In IntelliJ, open Preferences, section Plugins, choose "Install plugin from disk..." and navigate to the scala-plugin.zip
  3. Restart IntelliJ
You can’t perform that action at this time.