I’m a huge IntelliJ fan, and ever since I started with Scala (Scala 2, that is), I’ve been using the Scala IDE — meaning IntelliJ with the Scala plugin.
Lately, I’ve been playing around with Metals and realized there are some things I really enjoy (e.g., the font, the syntax highlighting, …). On the other hand, VSCode isn’t a real IDE — refactoring in VSCode is not great, to say the least, and working with Java code at the same time isn’t a good experience either.
IntelliJ, on the other hand, feels like home to me. But I don’t like how Scala code is presented (I believe that as developers, since we look at code all day, this really matters), and I get the feeling that the Scala plugin is no longer a priority — JetBrains seems to be focusing on their own language instead.
What’s your take on this? What does your daily workflow look like? What could I learn from you?
The main problem, as I understand it, is that they decided to replicate Scala 3 compiler’s type-checker (or something like that) inside IntelliJ and this turned out to be very difficult.
But I think JetBrains is putting in a lot of effort, in good faith.
Metals has the advantage of working closely / directly with the Scala 3 compiler itself.
Intellij with Scala 2.x I really don’t think gives much grounds for complaint.
Intellij with Scala 3: my experience is that it frequently cannot navigate around valid code, reports spurious errors, and uses huge amounts of my CPUs. It works fine on small, single-file examples but fails when working on Scala 3 codebases at scale. I actually wish all new feature development would halt on Intellij Scala plugin until they could load and navigate around, eg all the Scala 3 community build codebases without failing.
I switched to Metals in desperation, even though I much prefer Intellij overall.
I’ll check back periodically to see if they’ve got it fixed. Blogs about new features won’t convince me though. The main test I care about is “Can I open a large Scala 3 codebase and use code hyperlink navigation reliably?”
I did get the sense that Scala support had been deprioritized in IntelliJ. But I’d love to be wrong about that, as I actually prefer the IDE to VSCode by a wide margin.
I agree with Ben, IntelliJ does not work very well with Scala 3. I keep using it because I’m faithful that eventually they will get it right, but for years now it has been a rather frustrating adventure. Their architecture seems broken, because very often, the IDE shows “unknown whatever” errors on the screen, while at the same time displaying exactly what the “unknown whatever” object actually is when doing a mouse over. So we are constantly told that something does not exist and exists at the same time, this huge bug has plagued IntelliJ for years now and they seem unable to nail it. I feel that we are back to the 1980’s, where the logic was: edit, compile, fix errors, repeat. It is as if the front-end or presentation compiler does not exist anymore. The plugin team at IntelliJ seems to spend a lot of time on gadgets rather than focusing on implementing a solid tool that can actually cope with a large code base.
That’s what I thought, but apparently JetBrains joined the SCAB what gives me hope that Scala has not been depriorized that much. Plus having a paid subscription the JetBrains support is very helpful if there is issues with Scala..
So do I - I don’t understand the hype about VSCode. I never liked text editors on sterioids and much perferred to have either a text editor (e.g., vim for command line) or an IDE for developing software. But this, of course, is personal taste.
Jetbrains involvement with Scala Center is indeed welcome. After your positive reports of progress, I thought I’d restest Intellij with Scala 3 (having switched to Metals now).
Example of one of my biggest problems is shown below. After Cmd-Click on Lot.regenerateLots, a Resolving Reference popup appears for perhaps 8 secs, before successfully navigating to the method. 8 secs pause breaks my flow when I’m just moving around code.
It’s not even a difficult member to resolve. Lot is an object with a def regenerateLots. No implicits, abstraction, typeclasses, extensions. Just go-to-member-on-object. And still it pops up and pauses.
In fairness, this seems to be some cache-warming delay. The second time I click, it’s almost instant.
This example is in a fully compiled codebase. It generally is much rougher experience when a codebase has compile-errors in it, eg, during construction or refactor. But of course, we need our IDE to still work even during refactors.
When people (including me) say, “IJ doesn’t work with Scala 3”, this is the kind of thing that’s just too slow, or too unreliable, to offer an acceptable experience.