Scala Plugin
Scala Plugin for IntelliJ IDEA and Android Studio
IntelliJ Scala Plugin 2024.2 Is Out!
Scala 3
The new release comes with lots of bug fixes and improvements to Scala 3 support. Here are some of them:
- For-comprehensions are now always handled correctly when used together with the “fewer braces” syntax.
- We fixed the issue where renaming parameters broke wildcard types.
- We now correctly handle constructor annotations.
- Support for export clauses and extension methods has been improved.
- We fixed a bug where IntelliJ Scala Plugin was not able to correctly infer intersection types.
- We have fixes for when optimizing imports sometimes removed used imports or wrongly handled wildcards and aliases in Scala 3 code.
- Import suggestions now include enum cases.
Better code highlighting
The new release includes several improvements to error and syntax highlighting.
- We now highlight class fields defined in parameter clauses as fields instead of parameters.
- Named arguments now have a distinct color highlighting, making them easier to identify in your code.
Named arguments, before and now:
- The regex syntax inside
Regex("...")
is now highlighted just as it’s done for"...".r
.
- We fixed some “valid code highlighted red” issues when the code was highlighted after refactoring or because the type of the symbol couldn’t be resolved. In many cases, semantic highlighting is now applied instantly as you type.
In addition, IntelliJ Scala Plugin is now more responsive when the user fixes errors, removing the red code right after the fix.
Improved Compiler-Based Highlighting
- The performance of compiler error highlighting has been improved. We avoid applying out-of-date error highlighting information to the editor when the user has already modified the file.
- Scala compiler diagnostics are now supported and available as regular IDEA quick fixes for easy application.
Better code completion
- IntelliJ Scala Plugin can now automatically fill out all methods’ named arguments and autocomplete literal values of a union type in Scala 3.
- Enum cases are now suggested whenever an enum type is expected. The feature works with Scala 3 enums, union types, Scala 2 ADTs, enumerations, and Java enums, simplifying coding by providing relevant suggestions.
Other Improvements
StringBuilder in the debugger
The contents of a StringBuilder is now displayed in the debugger as a string. This feature is available as well in the minor release 2024.1.21.
Onboarding tips
Onboarding tips are a new feature aimed at helping beginners. If you choose to use them when you start a new Scala project from scratch, Scala Plugin will generate a small program with a few tips about using IntelliJ Scala Plugin.
Better support for Sticky Lines
IntelliJ Scala Plugin now has better support for displaying values and variables and match case branches in the Sticky Lines panel.
Library download progress in sbt imports
Library download progress is shown during sbt project import. This feature is available as well in the minor release 2024.1.21.
The Copy Type context menu action
The new release introduces the “Copy type” context menu action in addition to the “Add type” intention. When you hover the cursor over a symbol and see its inferred type in a popup, you can now not only explicitly add it to the symbol but also copy-paste it somewhere else.
Enum file icons
File icons for enums were updated.
Advanced grammar and spelling check in ScalaDoc
We have integrated IntelliJ Scala Plugin with the Grazie plugin to provide advanced spelling and grammar checks in Scala comments, improving the quality of your code documentation. The Grazie Pro plugin offers more advanced features.
As always, your feedback is very welcome. Please report any issues you find to YouTrack. If you have any questions, feel free to ask us on Discord.
Happy developing!
The IntelliJ Scala Plugin team