Metals vs Intellij: What are the pros using?

Ive worked in some large corps with huge java backends that required intellij; using any other editor was futile, and im sure some of my peers thought me strange for even suggesting it

However, Scala provides the Metals vscode extension which would make me a much happier person, but im worried about interoperability with projects based on Intellij.

Is anyone actually using Metals in the field? Is it capable of running existing intellij scala projects?

A substantial number of folks use Metals (my anecdotal impression is about 10%, although I haven’t seen any concrete numbers recently), although it’s true that IntelliJ is still dominant. That said:

That’s generally a non-issue. IntelliJ and Metals are just the editors – they are absolutely required to conform to the language, and they don’t make any changes to it. The project as a whole should not be IntelliJ-based, it should be sbt-based: IntelliJ imports the sbt declarations and builds the IntelliJ environment based on that. It is rare (and usually discouraged) to even check in the IntelliJ files.

(I believe it is technically possible to build a Scala project in pure IntelliJ without sbt, but that would be regarded as pretty weird by most of us. In practice, I’ve never seen anyone except a beginner try to do so. Sbt is, in practice, the primary project-definition language. There are alternatives like Mill, or occasionally things like Gradle, but I don’t recall ever seeing a non-trivial project built primarily in IntelliJ.)

Obviously, if you have editor customizations, those probably don’t port from one to the other, but that’s usually a personal preference, not a project-level consideration. Even formatting rules are usually defined in a standard tool like scalafmt, and imported from there into IntelliJ.

As far as I know, it’s not terribly unusual for a given project to have some folks on IntelliJ and others on Metals – the environments have different pros and cons, so people have different preferences. AFAIK, if you’re following standard Scala best practices, there shouldn’t be any difficulty.


you hit it on the nail: my primary experience has been issues replicating the infra provided by intellij in vscode, especially since i know 1% of java and 0% of its ecosystem

my plan is to continue to use my current vscode setup for js and solidity, then try out this hack to create a profile for metals/sbt/scala plugins and configuration

Honestly, the hack seems potentially a bit overwrought to me – probably fine, but I don’t know that it’s likely to make much difference in practice unless you specifically plan to use a bunch of different environments yourself.

The key thing to keep in mind for Scala is that the IDE just shouldn’t be that important – the critical stuff should be largely external, in well-defined fomats, and the IDEs should just import from there, instead of being too much in charge.

(Personally, I don’t even allow IntelliJ to build the system for me – I keep an open Terminal window in my IntelliJ UI, and use sbt to do the builds.)

1 Like