Choosing an IDE/Editor for Clojure coding

40,227

Solution 1

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.

Solution 2

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.

Solution 3

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

Solution 4

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.

Solution 5

I've been recommended:

Share:
40,227
Chiron
Author by

Chiron

Guitarist, phoenix, programmer, readoholic, movies junkie, Bruce Wayne. (println \h\u\b\a\g\h\d\a\d\i~@~\g\m\a\i\l.\c\o\m)

Updated on February 07, 2020

Comments

  • Chiron
    Chiron over 4 years

    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?

  • Chiron
    Chiron over 13 years
    Thanks for the great answer. personally I wish if TextMate has a much better bundle for Clojure coding.
  • Alex Miller
    Alex Miller over 13 years
    I do not think that I will use Emacs forever but I have to say (from the other side) that I am glad that I invested the time to learn Emacs, if only to understand the pathos and pair with my Emacs-wielding brethren.
  • mikera
    mikera about 13 years
    +1 for a great answer. Note that the Eclipse REPL now uses the much superior nREPL (as of counterclockwise 2.0)
  • 9000
    9000 almost 11 years
    How about IntelliJ Idea (free edition) + this plugin?
  • FUD
    FUD over 10 years
    vim-fireplace is an outstanding addition to clojure programming in vim. You may wanna revisit. It has autocompletion, code navigation, macro operations and a repl(quasi).
  • Chiron
    Chiron about 10 years
    I feel that JetBrains is going to buy CursiveClojure in the future.
  • Chiron
    Chiron about 10 years
    I said: "I feel". So it is not a fact! :)
  • user1568901
    user1568901 about 8 years
    Unfortunately Enclojure now appears to be a dead project. Too bad. I liked it, but they never could seem to keep the plugin up to date with the latest NetBeans version. Wish I had the spare time to join that project...
  • Kent Fredric
    Kent Fredric over 7 years
    Your "this" link no longer links to a specific article about emacs or clojure.