IntelliJ Scala plugin 2018.1: inline hints, better Structure View, improved refactoring, and greater usability
Meet the newly released Scala Plugin 2018.1! It’s packed with a whole variety of features, improvements and bug-fixes, and ready for download. In preparing this release for you, we’ve focused on the overall quality and UI/UX aspects, but also managed to add a couple of new interesting features. Read on to find out more.
Parameter Name Hints
If you’ve worked with Java code in IntelliJ IDEA, you’ve probably noticed the feature called “Parameter name hints”. The Scala language has a similar tool called “Named arguments” but we actually cannot completely rely on it. Sometimes developers do not use named arguments in places where they’re useful; and if you call a method from Java, you can not use named arguments at all. That’s why Inline hints are useful for Scala.
You can easily customize when to show such hints in Preferences | Editor | General | Appearance | Show parameter hints | Configure | Scala.
Similarly to the previous feature, the Scala plugin now supports showing inferred types. You can configure these hints by going to Preferences | Editor | General | Appearance. For example, you can ask the Editor to show result type hints only for functions, properties, or local variables, and to hide all hints with length greater than
n. You can also disable type hints when the type is obvious.
Structure View improvement
The Structure View now shows you more information about code. It displays
abstract, and access modifiers, nested definitions, primary constructor types, case class parameters as members, etc.
The Structure View also provides an option to show all inherited members with their original class. Also, we’re now displaying Scala types, not Java signatures (with “void”, etc.).
Refactoring: Inline function with parameters
Want to perform the inline refactoring for a function with parameters? You’re in luck! Thanks to our contributors from Wix, the refactoring is now capable of inlining such kind of functions. It correctly substitutes them with actual values.
Macro expansion feature update
We have made a few changes to the way macro expansion capturing works, when
“-Ymacro-debug-lite” compiler option is enabled:
- Ambiguous keyboard shortcuts have been removed and replaced with a gutter icon that expands macro right in the editor.
- Capturing expansions is only available when using SBT-shell for building the project.
Your feedback is always very welcome. Please do report bugs you find, and share your ideas, in our issue tracker. Thanks!
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…
IntelliJ Scala Plugin 2022.3 Is Out!
This release has been again focused on Scala 3, but there are also quite a few other improvements. Better Scala 3 support In v2022.3, we’ve introduced a large number of upgrades to provide better Scala 3 support. The IDE now supports parameter untupling and quoted patterns, and it features man…