What’s changed in completion
Recently completion was improved, so I want to describe most significant changes:
- Basic completion works as Class Name completion in case if nothing found. If something is found, you can invoke second basic completion to observe classes, which you want to import.
So if you want to import for example HashMap you can just type HashMap and choose appropriate variant (in case if autopopup completion is enabled).
- Completion after ‘@’ is smarter now. Both class name and basic completions show only annotations (scala and java).
- Added false, true, this and prefixed this to smart completion. Added prefixed this and super to basic completion (so now it’s much simpler to type such code).
- String.length, String.hashCode, String.trim has no side effects, so it’s always completing without unnecessary, annoying parentheses.
- Class name completion after point tries to find possible implicit conversions (with fixing imports), for example:
- Basic completion can filter inappropriate variants after implicit conversions in case if there are two implicit conversions, which lead to two elements with same signature. It means that this is impossible to use such variant, because of implicit ambiguity. For example parameter ‘x’ in class ‘Ensuring’ and parameter ‘x’ in class ‘ArrowAssoc’, these variants are bad, so it can be filtered.
- All completion can choose variants of same name, which have the biggest priority in place, where completion was invoked, so you will see only variant, to which actually will be resolved reference after completion. So it means that shadowing is supported by completion.
- classOf completion always inserts ‘’.
- Class name completion supports aliased imports.
- Improved completion from Java for Scala keywords like ‘Thread.yield’ (it suggests only back-ticked variant).
- Added smart completion for eta expanded functions:
- Added smart completion for enum elements (Java and Scala).
- Added smart completion for factory methods (static methods for Java classes, methods from companion object for Scala classes).
- Name completion for classes. On toplevel if there is no class matching to file name, it suggests file name as class name. For all possible companion classes it suggests name of these classes (to make creation of companion objects faster and less error-prone).
- Some completion now works on first invocation (https://blog.jetbrains.com/scala/2011/09/16/some-smart-completion/).
- Second smart completion searches chains of methods:
- Fixed many bugs and usability problems.
IntelliJ Scala Plugin 2023.3 Is Out!
Scala 3 As usual, the new release focused much on improving the Scala 3 support. Especially enums received much attention. The Scala plugin now recognizes that enums cannot be extended and highlights such attempts; annotations and modifiers are now propagated correctly to generated symbols; type…
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…