(Perfect? Environment)

 
One of the most common combinations for Clojure development is Emacs and Leiningen build tool.

 Leiningen allows you to define your project using Clojure and includes dependency management (like Maven but nicer) as well as structured templates for project files & folders.  Emacs provides Clojure runtime (REPL) support and excellent syntax highlighting via the clojure-mode plugin, along with bracket and character matching via the paredit plugin.  

Clojure is also available for many of the common tools such as Netbeans, Eclipse (CounterClockwise) and IntelliJ.  The best language support is usually found in Emacs, in part due to their shared evolution from Lisp. 

The easiest way to start is to use the Emacs Live setup or you can follow the simple guide below if you want to understand how its all set up.

Simple guide
The following guide will help you set up an Emacs environment for Clojure development in 5 easy steps:



Alternatives to Emacs

Netbeans and Enclojure
Netbeans has support for the repl and syntax highliting using the enclojure plugin, easily added through the netbeans plugin manager.  Clojure build management is done via Maven.



Eclipse and Counterclockwise

Emacs Live - ready made setup

Sam Aaron has created a great clojure setup for Emacs, with colour matched parenthesis, auto-complete, undo-tree, nrepl & swank support and all the other goodies that make Emacs Clojure development fly.

1) Run the easy install script found on Emacs Live git repository:
 http://github.com/overtone/emacs-live

This script will move any existing ~/.emacs file, ~/.emacs.el file or ~/.emacs.d/ directory out of the way and create a new one fully loaded and configured

4) Once the script is complete, start Emacs.  You will see many messages and perhaps a few warnings, but Dont Panic!

5) If you are concerned about the warnings, restart Emacs and you should see a lot less


Add Leiningen 2 for Build & Project management

To get a complete Clojure environment, you should also install Leiningen 2 and configure it to include the REPL plugin in all projects. This enables you to run the REPL in emacs using M-x clojure-jack-in or for the newer nREPL use M-x nrepl-jack-in