share
Stack OverflowWhich is the best IDE for Scala development?
[+226] [22] Craig P. Motlin
[2009-01-07 04:40:19]
[ ide scala ]
[ http://stackoverflow.com/questions/419207/which-is-the-best-ide-for-scala-development ] [DELETED]

I like all three of the popular Java IDE's and all three have plug-ins for Scala. I'll probably try all three eventually, but since I'm totally new to the language I figured I'd ask which is the most full featured Scala IDE?

(4) + Thanks for adding the 2.8 question link. - Nils Schmidt
(1) As far as JetBrains' Scala plug-in for IDEA goes, the story is the same for 2.7 and 2.8. Both are equally well suppoorted. - Randall Schulz
(73) You've closed the most useful question i've seen. - santiagobasulto
This question also exists on Programmers.stackexchange here: programmers.stackexchange.com/questions/7804/… - fourk
(5) Ironically, it's closed there as well :) - Balázs Mária Németh
[+265] [2009-06-21 19:24:27] Craig P. Motlin [ACCEPTED]

IntelliJ

December 2013

I feel obligated to keep the updates coming. I decided to work through the "Principles of Reactive Programming" Coursera course [1] using the latest milestones of Eclipse and IntelliJ. As of December 2013, IntelliJ is far better. The refactoring support is greatly improved. The refactoring support for Java is still better, but all the common refactorings are there. Since I've been paying attention for a few years now, I can say that the feature gap is growing. Even if JetBrains stopped all work for two years, I doubt that Typesafe could catch up. The current versions are Scala 2.10.3, IntelliJ 13 EAP, and Eclipse Scala IDE 4.0.0 Milestone 1.

Some specific feature gaps:

  • Eclipse still doesn't always place curly braces at the right level of indentation. This has been rock solid in IntelliJ for years.
  • "Extract" refactorings like extract local value don't guess the variable name. The variable is named extractedLocalValue until you rename it.
  • There's still no auto-fix to add or remove a type annotation from vars, vals, parameters, and methods. Compiler errors like type mismatches have no auto-fix. If you want to add a type annotation you have to type Ctrl + Shift + w to see the type in a pop-up, and then type the type annotation yourself.
  • Auto complete doesn't work in as many situations, like after the keyword "new".

For reference, here are my previous updates.

September 2012

I feel obligated to keep the updates coming. I decided to work through the "Functional Programming Principles in Scala" Coursera course [2] using the Eclipse-based Scala IDE 2.1-M2 and I'm still sticking with IntelliJ. The Eclipse plugin has a few new refactorings, but it still messes up basic things like indenting if there's anything other than curly braces on the line. Plus I miss two crucial features that IntelliJ has had for a while; the ability to reformat or re-indent a whole file, and the auto-fix which adds or removes type annotations.

January 2012

As of January 2012, using 2.9.1, I'm still using IntelliJ. Scala IDE for Eclipse 2.0.0 is less buggy than previous versions, but the new features were already mostly already there in IntelliJ since September 2010. The refactoring support isn't great in any IDE, but IntelliJ is still slightly ahead.

September 2011

As of September 2011, using 2.9.0, I'm still using IntelliJ. I haven't tried Eclipse or Netbeans in the last year. Not much has changed.

September 2010

As of September 2010, using 2.8.0, I'm happy with IntelliJ, it's nearly satisfactory.

March 2010

As of March 2010, using snapshot builds of Scala 2.8, I find IntelliJ to be the best.

June 2009

I've finally had the chance to use all three. As of June 2009, I find NetBeans to be the best. That's based purely on the editor though and I find Eclipse to be better in other ways. None of the three are very mature now, so I use Vim just as often.

[1] https://class.coursera.org/reactive-001/class/index
[2] https://www.coursera.org/course/progfun

(1) Can you elaborate on differences? Your opinions would be very helpful. - Łukasz Lew
Can you update info for 2011?, thanks - yura
are you using the Enterprise or Community Edition? - onejigtwojig
(155) +1 for continuous updates. - DMan
@onejigtwojig I use both editions, pro at work and community at home. I actually haven't noticed a difference - I don't need Tomcat support or anything. - Craig P. Motlin
(1) ScalaIDE for Eclipse 2.0 is out and it's pretty good. - haknick
(4) reformat of a file on Eclipse can be done with ctrl+shift+F and ctrl+shift+O for adding imports ;) And refractorying works much better now - pablisco
To put in my opinion: after using Eclipse for 9 months, I switched to IntelliJ 12.1. Opinions aside, IntelliJ has WAY better Scala support than Eclipse. And in my opinion, IntelliJ is better all around. :) - GJK
(4) How 'bout another update for Sept 2013? - Erik Allik
(1) @ErikAllik done :) - Craig P. Motlin
The thing with IDEA though is that it just looks and feels terrible on OS X... - Erik Allik
1
[+20] [2009-03-16 03:47:06] stepancheg

I'm using Vim and happy with it.


(11) !! does that count as an IDE? - oxbow_lakes
(12) Of course is an IDE, autocompletion, search for files, navigate and more, you just need to learn it and it's awesome - MexicanHacker
2
[+19] [2009-01-07 04:50:06] Adeel Ansari

I am fan of Netbeans, if you include commercial then I would go for IntelliJ ;).

Here is the Scala Plugin for Netbeans [1]. But remember its an experimental thingy, and you might need to pull it from nightly builts. For now, its good to go with Eclipse Scala Plugin, and if you are inclined towards Eclipse like Brian, and unlike me, then Eclipse is an obvious choice indeed.

[1] http://wiki.netbeans.org/Scala

(1) I think the javascript support in Netbeans is awesome. So maybe I'll give the Scala Plugin a try. - Brian Fisher
(6) IntelliJ IDEA now has a Community Edition that supports Scala: jetbrains.com/idea/features/editions_comparison_matrix.html - Frederik
For NB6.8, after initial install, it takes a bit of tweaking and that may put off some people, but after you fix it, its smooth (well almost) sailing. Here's what I did: (1) Install Scala nightly built (mine is 2.8.0.r22602-b20100720020114). (2) Install NB 6.8, and the scala plugin. (3) Follow the instructions at the plugin site: put -J-Xmx1024m -J-XX:MaxPermSize=500m in etc/netbeans.conf and remove -J-ea if it exists. Everything works nicely, including code completion, refactoring. Its still somewhat buggy but managable. Better than Eclipse and IMO also IntelliJ. - Jus12
Also, make sure you read this, otherwise it will drive you crazy: wiki.netbeans.org/Scala68v1#Reset_Scala_parser_when_necessary - Jus12
3
[+19] [2009-01-07 07:41:09] Daniel Spiewak

Eclipse Scala is probably the most featureful as the editor goes, but it's also pretty unstable. IntelliJ and NetBeans tend to be more stable in general. NetBeans also has some lift integration (or so I hear).

Personally, I find all of the Scala IDEs to be insufficient for my needs. For some reason they choke on a file with 70 case classes... Instead, I use jEdit with a tweaked editor mode [1]. Between that and Buildr's Scala support, life is golden!

[1] http://github.com/djspiewak/jedit-modes/tree/master/scala.xml

(1) The NetBeans Maven plugin works pretty seamlessly with Scala projects, which I think is the extent of the "Lift integration". - Calum
(2) I think the fact that NetBeans Scala plugin can achieve a solid "Lift integration" w/o actually having one is a huge credit to NetBeans. - Erik Engbrecht
4
[+10] [2010-10-18 17:57:50] nadavwr

For everybody who is okay with EMACS, check out ENSIME -- http://youtu.be/A2Lai8IjLoY?hd=1

Allegedly, the server portion is generic and can be refitted to other front ends -- hoping to see Eclim Scala support one day.


For large projects it fills process and memory. :( - scrapcodes
5
[+9] [2009-01-14 02:14:58] Dave Ray

I'm really comfortable in Eclipse so I started there. First, I had weird difficulties getting JUnit to work. I think this was because I added the JUnit library to the project after I had already added some Scala classes to it. Then I tried to rename a file and it went bezerk. So I tried NetBeans instead. I've found it a little less responsive (NetBeans always is, it seems) and it has a few less features, but it seems much more stable so I'll stick with that until I hear otherwise.

Now that I'm more familiar with the Scala libraries though, I'm not sure I really need an IDE. I find myself much less reliant on "Ctrl + Space" coding than in Java. Maybe I'll go back to vim eventually.


6
[+7] [2009-01-24 06:18:17] Bob

You should definitely try out all 3. None has extensive features when it comes to Scala, so you'll probably have a favorite of the 3 after only a day or two of testing. My current fave is IDEA.


7
[+6] [2009-01-07 05:04:05] sblundy

The Eclipse Scala plugin is being developed by the scala language team, so it the official one. I prefer IntelliJ in general, so I use theirs. It works fine for me :-)


8
[+6] [2010-01-24 00:31:44] huynhjl

In the context of 2.8, I have used Eclipse 3.5.x with the nightly plug-in and IDEA Community Edition 9.0. IDEA has been clearly better for me, except for compilation times. But I use sbt in parallel and it takes care of that.

My main issues with the Eclipse plug-in are:

  • Inability to change my tab settings in Eclipse (though that seems to work for others)
  • Code compiles but some errors are still highlighted and I need to close and reopen the file
  • Auto-completion just returns a lot of choices

I did not have those issues in IDEA 9.0 build #IC-93.13 with the recent plug-in 0.3.385. Additionally IDEA shows me unused import statements.

All plug-ins seems to be evolving quite quickly and are actively developed and I suspect that what is true today may not be in one month. I hope that in a few months from now, we will just be able to use our favorite IDE and have good Scala support.


9
[+6] [2010-09-06 14:35:29] tuxSlayer

The question is actually "not the worst Scala plugin" because all of them are pretty ugly and buggy. Its strange thing that such an expressive, powerful and progressive language still have no convenient IDE.

I checked out all of them but now using Eclipse plugin and I'm pretty dissatisfied with it. It crashes all the time, gives weird suggestions and doesn't allow to do even simple refactoring.


I certainly disagree that the Scala plug-in for IDEA is either ugly or buggy. - Randall Schulz
10
[+5] [2009-01-24 16:20:45] Erik Engbrecht

I use Netbeans. The Eclipse plugin is definitely more advanced, but every time I try it, it drives me crazy with problems.


11
[+5] [2010-09-12 15:35:25] pvillela

Updated on 2011-10-07:

One year after my original answer, I continue to stand by it. IntelliJ 10.5 (I'm using the Community Edition) with the Scala plugin beats the heck out of the latest Scala IDE for Eclipse. For Scala, IntelliJ is (in my experience) much faster and stable than Eclipse. IntelliJ editing and debugging with Scala 2.9.1 is very smooth. The previously noted full rebuild problem no longer exists.

Original answer:

I have installed the community edition of IntelliJ version 9.0.3 with the Scala plugin and it works beautifully -- syntax highlighting, code completion, and (this is critical given limited documentation for Scala, especially 2.8) the ability to navigate to declarations and implementations of Scala library classes and functions. IntelliJ seems to rebuild the entire project whenever you "make" the project, but in that regard it's no worse than the Scala Eclipse IDE. No crashes so far.

Before trying IntelliJ, I tried the Scala plugin for Eclipse and was very disappointed with it. I had tried it in the past and it was pretty flaky, but still provided some value despite its bugginess. I tried the latest "stable" Scala Eclipse version (Scala 2.8, Eclipse 3.5.2) yesterday (before installing IntelliJ) and it is effectively unusable -- very slow, buggy, crashes often (at least on Ubuntu 10.04 64 bit).


12
[+4] [2009-01-07 04:43:12] Brian Fisher

I think the Eclipse Scala plug-in is my favorite. Although I use Eclipse for Java so it was an obvious choice.


+1 for now, since netbeans plugin is experimental. ;) - Adeel Ansari
why +1? Eclipse's is even more experimental. - Jus12
13
[+4] [2011-01-15 21:19:28] J Adam Crain

IntelliJ 10 is sooo much better than eclipse as of 01/11. My team struggled with Eclipse Scala stability for months.

If you're doing anything beyond very basic scala development (i.e. big project with continuous integration etc) I recommend using Intellij with Maven 3. The integration between the 2 is nearly seamless.

Spend your time in IntelliJ and use maven for build. We've tried Eclipse and SBT/Buildr. Although both of the tools beat mavne in speed and DSL capability, they lose because of their less comprehensive plugin support and community. Bottom line is maven be a pain but the plugins actually work well. You won't be regretting it when you have to integrate cover, make osgi bundles, etc. There are plugins for everything.


The IntelliJ plugin reports errors that are none and does not report a lot of others. Since type inference does not work properly, code completion is often no help. What remains is syntax highlighting, build support and test support. But at least it is stable. - Raphael
At first, I thought IntelliJ would be cool. I would gladly pay several hundred dollars to get a Scala-capable IDE that works. Then i realized I could browse what files were inside my lib jars, and that sometimes for no reason IDEA would go completely psycho on imports and keep importing over and over no matter how many times I'd try to erase, the java util logging class that it apparently thought was overlapping with slf4s/slf4j. Honestly the hype around IDEA is bullshit. It's just as bad as Eclipse/Netbeans. - orange80
14
[+3] [2009-01-24 16:00:01] Marcus Downing

I've tried all three plugins now. I started with the Eclipse one, since I use that in Java, but it's still hopelessly unstable. The Netbeans one feels much more reliable, but I was hoping for more features. So I'm trying the IDEA one right now - so far it feels a bit temperamental but potentially more powerful.

All three need some work, it seems. :(


15
[+3] [2010-09-15 01:48:58] Kevin Wright

It partly depends on your style of working, as all the options have strengths and weaknesses.

If you need refactoring across mixed java/scala projects, then IntelliJ is your only option. IntelliJ is also the most stable option for Scala 2.7 code.

If you want to do any work on the compiler or a compiler plugin, then Eclipse has the advantage of being able to launch a runtime workspace with a custom compiler build, including breakpoints.

Netbeans is a fine choice to go with if you're already very familiar with that platform, the costs of learning a new environment may well outweigh any benefits, and all three solutions are improving rapidly.


16
[+2] [2009-01-24 15:13:46] Lemmy

I think Eclipse is the smallest evil at the moment. But it is also horrible buggy and not up to the language unfortunately.


17
[+2] [2009-08-10 14:35:44] sroebuck

I currently use TextMate (on Mac) with one of the TextMate Scala plugins/bundles and the Simple Build Tool (sbt) which automatically builds and tests if required whenever the source files change. Quick, simple and robust.


18
[+2] [2010-11-12 14:44:50] Bruce Ferguson

I tried the Eclipse version, and found it to be extremely buggy. However, after digging a little, I came across some heap setting changes they suggested to make in the eclipse.ini file. After making these changes, the plugin behaves quite well. I think they should be more explicit about these settings, as it almost turned me off of the IDE when I was trying to use Eclipse without them.


I don't suppose you could share them with us, could you? - skaffman
Here is the link assembla.com/wiki/show/scala-ide/Troubleshooting - Bruce Ferguson
Also, I never knew this until yesterday, but to access the eclipse.ini file on a Mac (which at first glance is nowhere to be found), you actually need to do a control-Mouse click on the eclipse executable to get a drop down the menu, from which you can select Show Package Contents. After it pops up another finder window with Contents in it, you can find eclipse.ini under Contents/MacOS, and make the necessary edits. - Bruce Ferguson
19
[0] [2010-12-01 04:26:16] prassee

I have been using scala for the past few months from my experience i found that IntelliJIDEA is so far the most convenient for the beginners. Though it lacks support for the lift framework its good to go with.... However as linjunhalida said ... the Emacs with the ENSIME plugin has the best support for the language so far ..... :-)


20
[0] [2011-01-19 11:02:07] kuszi

Short code snippets you can even edit, compile and run online with ideone [1]

[1] http://ideone.com/recent/39-scala

21
[0] [2011-02-25 15:15:16] user510803

For what its worth, albeit a little late to the conversation; I have found IntelliJ to the best most stable at the moment. My only complaint is when you're not using Maven to set up a Lift project -- its a bit fiddly for that. Otherwise just using the IDE for Scala is great.


22