Scala logo

The Scala Plugin Blog

Scala Plugin for IntelliJ IDEA and Android Studio

Features News Releases

IntelliJ Scala Plugin 2021.1 Is Out!

With this major version, we’ve focused primarily on the performance and overall quality of the plugin. We’ve still added a number of new features to help with day-to-day Scala programming. Let’s take a closer look.

1. Kinds in type diffs
2. Machine learning completion
3. Phases and units in compilation charts
4. Scala 3.0.0-RC2 support
5. IntelliJ Platform plugin template
6. And more!

Kinds in type diffs

Scala developers don’t always use higher-kinded types, but when they do, they like to do it with style. The type diff tooltip now supports kinds:

Because type constructors, kinds, and higher-kinded types are somewhat advanced topics in Scala, having a down-to-earth explanation of a kind mismatch can be helpful (and is particularly relevant when you work with libraries that heavily use type classes, such as Cats or Scalaz).

Machine learning completion

This release introduces Scala code completion based on machine learning. You can enable the feature in Settings | Editor | Code Completion | ML | Scala:

The Machine Learning Code Completion plugin must be enabled for the feature to be available. You may choose to Mark position changes in completion popup to see how ML affects the order of elements. (Please note that this feature is experimental, so ranking may not change noticeably.) Read this IntelliJ IDEA blog post to learn more about ML completion.

Phases and units in compilation charts

In addition to modules, compilation charts can now show phases and units, so you can gain even deeper insight into your compilation – open the Build tool window, select the Chart node, and choose the desired Level of detail.

You can use Phases to estimate how compiler plugins, implicit resolution, and macro expansion affect project compilation time:

Units are helpful for detecting source files that take a long time to compile:

To speed up incremental compilation and reduce memory consumption, you may want to split large source files into several smaller ones. However, because compilation time depends on many factors, not just lines of code, it’s not easy to predict how the files should be split by guesswork. That’s where the detailed chart can prove particularly useful.

Scala 3.0.0-RC2 support

Can we support Scala 3.0.0-RC2, given that it has been released just days ago? Yes, we can! Feel free to open the scala-3-example-project using IntelliJ IDEA:

What’s more, we’re already using Scala 3 ourselves in the intellij-scala project!

IntelliJ Platform plugin template

The sbt-idea-plugin makes it possible to develop IntelliJ Platform plugins using Scala and sbt. There’s now a built-in Project Wizard template to make the process even easier (this feature depends on the Plugin DevKit):

The template project is also available on GitHub.

To learn more about the IntelliJ Platform, take a look at:

And more!

In addition to all the above, there are lots of small but important improvements, such as better handling of escape sequences in raw strings and in multi-line interpolated strings, string conversion improvements, better handling of SAM conversions and eta-expansions, proper handling of javac options in sbt, and much more!

Your feedback, as always, is very welcome. Please report any issues you find to YouTrack. And if you have any questions, feel free to ask them in our Gitter.

Sincerely,
The IntelliJ Scala Plugin team

Discover more