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
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:
- How to contribute to the IntelliJ Scala plugin – our own introduction to the IntelliJ Platform.
- Building IntelliJ IDEA plugins in Scala – a presentation by Igal Tabachnik.
- IntelliJ Platform SDK – the official documentation.
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!
The IntelliJ Scala Plugin team
IntelliJScala @ Scala Days 2023 Madrid
On September 12 – 14, the Scala Plugin team was in Madrid for the Scala Days conference. JetBrains was a Gold Sponsor for the event and we are very proud of it. We came to Madrid with a booth, merchandise, and a talk about the IntelliJ Scala Plugin. The Scala Plugin has seen a lot of improvements…
IntelliJ Scala Plugin 2023.2 Is Out!
Better Scala 3 Support IntelliJ IDEA 2023.2 brings enhanced Scala 3 support, with a focus on providing a streamlined development experience. Notable improvements include fixes for Scala 3 enum highlighting, navigation to enum definitions, and the correct resolution of enum cases in various contex…
IntelliJ Scala Plugin 2023.1 Is Out!
Improved support for braceless Scala syntax IntelliJ IDEA can now desugar braceless Scala code properly, and it handles refactorings where the “fewer braces” feature is used. It also supports braceless syntax in worksheets and correctly interprets indentation when you move extensions methods up a…
Performance tips for IntelliJ Scala Plugin
A full-blown IDE is one of the most complicated applications you can find on an average laptop. This is why we – the Scala plugin team at JetBrains – from time to time receive reports that our product lags in certain situations or works slowly in general. In some of these cases we can help, but in o…