IntelliJ Scala Plugin 2021.2 EAP: Package Search Integration
Package Search is a service developed by JetBrains that supports searching for libraries from multiple repositories such as Maven Central, Google Maven, and others.
Since its introduction at the end of 2019, the Package Search plugin has made searching for and managing dependencies for Maven and Gradle projects more convenient. Starting with the Scala plugin 2021.2 release, the Package Search plugin features will also be available for sbt projects. In addition, the Package Search APIs are integrated to help users manage library dependencies directly from the IntelliJ IDEA editor.
From the Package Search plugin window, we can see the list of the library dependencies being used by an sbt main project and its subproject(s):
Add a new dependency
Follow these three simple steps to add a new dependency to your project:
- Select the desired module.
- Search for the new dependency using the Package Search plugin’s search bar.
- After finding the suitable dependency in the Search Results list, click Add to open the pop-up window that allows you to select where to add the dependency.
Another (much simpler) way to add a new dependency to a project is to use the auto-completion feature from IntelliJ IDEA’s code editor (the data used for this feature comes from the Package Search APIs):
Newer stable version suggestions
When newer stable versions are available for your library dependencies, an inspection will underline your older version string and give you the option to update it with just one click:
Scala version auto-completion
With the help of the Package Search APIs, it is now easy to look up the list of available Scala versions when filling in scalaVersion:
As these features are still under development, you need to be using IntelliJ IDEA 2021.2 EAP and have the Scala plugin’s update channel set to EAP in order to try them out. In addition, the Package Search plugin, which comes bundled with IntelliJ IDEA 2021.2, needs to be enabled.
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…