IntelliJ IDEA Scala plugin 2017.2: SBT 1.0, improved SBT Shell, Play 2.6 and better implicits management
This summer, we are happy to announce a number of new features and improvements in the Scala Plugin. Some of them we decided to introduce in the 2017.1 updates, as soon as they were ready. And the rest are coming to you now – with IntelliJ IDEA 2017.2. We appreciate the contributions of all EAP participants. So, let’s do a brief overview of the recent changes.
Debugging in SBT Shell
Not so long ago we introduced SBT Shell which makes work with SBT project in IntelliJ IDEA more convenient. We continued to improve this feature and can now announce its integration with debugger. With one button click the SBT Shell launches the Debugger server and connects to it.
Before debugging, just make sure you’ve run the Debugger server via a click on the left-side panel in SBT Shell.
Play 2.6 support
Play Framework recently released its 2.6 version with lots of cool features. We’ve provided support for all this new functionality via gutter icons, code highlighting, navigation and project wizard to make your work more comfortable and effective.
Implicits management
We’ve improved the Type Annotations inspection by including implicit declarations processing. Any implicit is worth being explicitly annotated. It significantly increases the performance of compilation and IDE code analysis. It reduces the risk of a type inconsistency. Moreover it’s obligatorily in Dotty. You can configure this inspection by going to Preferences / Editor / Code Style / Scala / Type Annotations.
Another feature – if you call Smart Completion for following types: akka.actor.ActorRef
, scala.concurrent.Future
and collections from java.util
, scala.collection
, it also suggests implicit conversions, and adds import statements automatically:
SBT 1.0 support
In the middle of July, Lightbend announced SBT 1.0.0-RC2. A list of new features, fixes, and other changes you may find here. We keep track of SBT 1.0 progress and support of all its new functionality. The Scala Plugin 2017.2.5 already has partial support of SBT 1.0 RC2, and we have plans to declare complete support in newest plugin update.
Your feedback on these improvements is very welcome. Expect more features and improvements in the 2017.2 updates of the IntelliJ Scala plugin.
P.S: Don’t forget to report bugs / ideas to our issue tracker.
Drive to develop!
kubukoz says:
July 19, 2017Good stuff! Any news on whether you’re going to support “find usages” for implicits anytime soon? 🙂
Anton Yalyshev says:
July 19, 2017That’s a good point. Indeed the Scala Plugin gathers a lot of useful information for its Type Inference. And this information is just partially available for a user. Definitely we want to provide it entirely, in a most convenient way.
I can say that we already have some progress in this task, but it’s a bit early to give a public announcement regarding exact time and description of the feature. With a high probability, it will be done in observable future.
me says:
July 20, 2017ok then observable future.subscribe ( f => emailMeFeatureAvailable(f.get()))
Sven says:
July 21, 2017And still no [Ctrl]+[D] support for the SBT console, so that it still isn’t usable for play projects 🙁
Justin Kaeser says:
July 24, 2017Sorry we missed that mark. It will come in an update soon!
I see you’ve already commented on https://youtrack.jetbrains.com/issue/SCL-11603, anybody else waiting for this feature please follow the ticket
Peter Goggi Jr says:
July 25, 2017I don’t see any option in Editor > Code Style > Scala > Type Annotations to enable the type annotation requirement for implicit declarations. Am I missing something?
Anton Yalyshev says:
July 26, 2017Do you have this section in your menu? https://ibb.co/hKaPaQ
Kenner Stross says:
August 1, 2017No, I only see sections for Instance, Local and Refinements. There is no such Implicit section. That’s why we’re confused…
Build 172.3317.76
Pavel Fatin says:
August 1, 2017We’ve added fine-grained settings which will be available in the upcoming nightly build & 2017.2 EAP Scala plugin build by tomorrow (and then in the 2017.2 bug-fix release build).
Carfield Yim says:
August 21, 2017My intelliJ keep complainting this
==== Maven Central: tried
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.16/sbt-0.13.16.pom
— artifact org.scala-sbt#sbt;0.13.16!sbt.jar:
https://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.16/sbt-0.13.16.jar
It probably because this file is not exist anymore, how can I tell intelliJ use 1.0 version of SBT?
Nick says:
August 23, 2017How can I create an configuration that connects and runs a specific task on sbt shell?
Justin Kaeser says:
August 23, 2017That’s currently a missing feature. Please vote on it on YouTrack to give it more weight: https://youtrack.jetbrains.com/issue/SCL-11748
David Pérez says:
September 15, 2017When will be SBT 1.0 support official?
Justin Kaeser says:
September 15, 2017sbt 1.0 support is already official 🙂
Julian Fleischer says:
September 21, 2017for me that official sbt 1.0 support does not work.
when importing an sbt 1.0 project and /not/ using sbt shell it can’t build the project. when importang it and using sbt shell it can’t run the tests, so I have to use “testOnly …” in the shell. That is fine with me but why am I using an Integrated Development Environment again? Also not being able to run tests from the IDE is a big bummer.
sbt 1.0.2 and latest stable release.
Mike says:
December 27, 2017I sometimes use the “new play project” menu path.
The build.sbt has the following:
unmanagedResourceDirectories in Test <+= baseDirectory ( _ /"target/web/public/test" )
This isn't supported under sbt 1.0.
Will this be fixed?