49
votes

I'm looking for an editor or an IDE for my Clojure coding and I found this thread:
Clojure editor/IDE recommendations on Mac OS X

However I have a couple of questions:
Which IDE offers the best Clojure environment (right now): IntelliJ, Eclipse or NetBeans?
What are the advantages of Aquamacs (I read Rick is using it) over the previous heavy-weight IDEs?

14
I referred to that thread at the beginning of my question. - Chiron
I ended up using SublimeText for most of my programming. - Chiron

14 Answers

73
votes

I have spent significant chunks of time (on a Mac) with:

  • Textmate w/ Clojure bundle
  • Netbeans Enclojure
  • Eclipse CCW
  • Emacs.app (not Aquamacs)

My opinions on those:

Textmate - was a great way to get started and is obviously a very functional text editing environment. At some point I wanted better REPL integration.

NetBeans - not wanting to learn Emacs, I switched to NetBeans. The NetBeans editor is ok. I found the integration with build tooling for things like Maven was rocky. The NetBeans remote repl is very very good.

Emacs - I eventually bit the bullet and learned Emacs. Editing with paredit is truly god-like. REPL integration is glorious as you'd expect. clojure-test-mode is very handy. But it's Emacs with all its pros and cons. If you're going to use Emacs on the mac, I'd recommend using Emacs.app, not Aquamacs. Aquamacs does not follow standard gnu emacs conventions and you'll find it harder to create a portable environment or use other people's extensions. Right now, I use Emacs for day-to-day editing and my normal work environment.

Eclipse - The Eclipse editor is coming along and the structural editing has some of the niceties of paredit (but not the truly essential slurp, barf, splice capability). The Eclipse repl is just a stock command-line repl and is pretty bad in comparison to NetBeans. However, the NetBeans remote repl has been broken out into an independent project and is coming very soon to Eclipse which will make Eclipse even more attractive. Maven integration is very good. I use Eclipse now when I want to see lots of files and projects at once, which I have a hard time doing in Emacs.

At the moment, my bet is that the Eclipse tooling will start to pull away from the others. But I'm still hoping for a Clojure-specific IDE to show up. :)

UPDATE Mar 10, 2014:

The world has changed a lot since I first wrote this. There are now at least 6 very good Clojure environments.

If you have not allegiance to a pre-existing editor and want an easy place to start, there are two great choices:

1) Nightcode - everything you basically need to write and run Clojure in a new editor written in Clojure itself. Really easy to set up and just get going.

2) Light Table - LT is written in ClojureScript but I'd say has more ambitious goals to change the way we write code, making it more interactive and our data more visible. Very active plugin scene.

If you are a Java programmer coming from the world of IDEs or feel like the support of a an IDE might be useful to you, then check out:

3) IntelliJ Cursive - this reboot of the IntelliJ Clojure environment is rapidly winning converts. Great set of tooling for Clojure and its getting even better rapidly.

4) Eclipse Counterclockwise - CCW has been in work for years and continues to file down the getting started and ease of use rough edges. If you're an Eclipse user already, you'll feel right at home.

If you are a keyboard hacker, both of these have excellent environments:

5) Emacs with CIDER - Emacs is more a way of life than an editor and for a long time was the only editor that could handle professional level needs for Clojure. If you don't already know Emacs, it is tough to learn both Emacs and Clojure at the same time. The "all in one" environments I've seen recommended most are Prelude and Emacs Live.

6) Vim with Fireplace - Vim has been through a couple phases but Fireplace is where it's at - lots of people are successful with it.

10
votes

I have used both vim, emacs, and Intellij. Of the three I'm most productive in emacs.

Before writing Clojure I had been using vim for four years (and before that emacs for three) and considered myself among the best of the other developers I knew with regards to efficiency in vim. As a result I started out using it for Clojure. I found it to be painful. I was using vimclojure and only vimclojure. About a month after I switched to emacs I stumbled across this post. Had I read that before switching to emacs I could see myself enjoying that setup.

I've since switched to emacs and completely believe the learning curve is worth it but it isn't for everyone.

4
votes

I quite like jEdit which is a fairly general purpose programmer's text editor. It has syntax highlighting and a Clojure REPL available as a plugin.

4
votes

I use MacVim with VimClojure and am happy with it. But I'm kind of biased...

3
votes

I've been recommended:

3
votes

Developing in Clojure goes very well with Emacs if you add some packages. I could recommend you some of these repositories:

https://github.com/bendisposto/emacs.d

Or if you have a german keyboard layout on your Mac you can use my configuration:

https://github.com/n2o/emacs.d

Copy the repo into your ~/.emacs.d folder and start emacs. It will first download and initialize the plugins and then you have a ready-for-clojure-configuration for emacs.

To start the REPL, just use:

M-x cider-jack-in

Those configurations from the repositories are all from this gist:

https://gist.github.com/rkneufeld/5126926

There you can see most of the keyboard shortcuts.

3
votes

Sublime Text with Paredit and SublimeREPL is a quite a good option.

Sublime Text is a powerful and light weight editor. It enjoys a big umbrella of plugins.

2
votes

Agree with Alex. I have tried NetBeans,Emacs, Textmate and Eclipse on OSX. For now, Eclipse is a better choice. BTW, it also depends on your background. If you are a Java programmer Eclipse is a very good choice. Sometimes, I use the REPL - for example to try out Clojure 1.3 Alpha3. We do need a Clojure-specific IDE; something like Komodo.

1
votes

There is a new Clojure plugin for Intellij called Cursive.

Unfortunately, it looks like La Clojure and Leiningen plugins are no longer supported and do not run well on Intellij 12 and 13.

1
votes

According to book "Clojure for the Brave and True" the best editor for clojure is emacs. Make sure you can get emacs.app for mac.

According to the writer:
"The reason I recommend Emacs is that it offers tight integration with a Clojure REPL, which allows you to instantly try out your code as you write. That kind of tight feedback loop will be useful while learning Clojure and, later, when writing real Clojure programs. Emacs is also great for working with any Lisp dialect; in fact, Emacs is written in a Lisp dialect called Emacs Lisp (elisp)." http://www.braveclojure.com/basic-emacs/

0
votes

Eclipse is best it's plugins are simply well integrated. I would recommend Nightcode on the side only because it was written in Clojure. I wouldn't touch Emacs with a fifty foot pole, I'm just not that hardcore.

0
votes

VS Code does it for me on Linux platform. Looked at Light Table and pretty much similar to VS Code - built off the same engine, I believe. Go with an IDE that is closest with what you are already familiar with would be my take on this. If you are used to JetBrains IDE then Cursive - watch the License terms though.

0
votes

I would also suggest looking at another IntelliJ Idea plugin "Clojure-Kit". It is younger than "Cursive Clojure" but might already provide all features you need.

It is already in JetBrains's plugin repository. Or you may build it from sources (see https://github.com/gregsh/Clojure-Kit)

0
votes

Atom also has very good Clojure support. You can find more details on how to set it up for Clojure here.