How to set up a Clojure dev environment on Snow Leopard

2 February 2013

Homebrew (package manager)

$ ruby -e "$(curl -fsSkL"

More information on Homebrew can be found on the Homebrew home page

Emacs 24 (editor)

$ brew install emacs --cocoa --use-git-head --HEAD # this takes a while

Emacs Prelude (enhanced Emacs 24 configuration)

$ git clone git:// /path/to/prelude
$ ln -s /path/to/prelude ~/.emacs.d

More information on Prelude can be found on the Prelude home page.

ParEdit (emacs minor mode for editing parentheses)

$ emacs
M-x package-install [RET] paredit [RET]

Add to ~/.emacs.d/init.el:

(add-hook 'nrepl-mode-hook 'paredit-mode)

See the EmacsWiki: ParEdit and ParEdit Cheatsheet.


$ git clone /path/to/clojure
$ cd /path/to/clojure
$ ./
$ ant
$ mkdir ~/.clojure
$ ln -s /path/to/clojure/clojure.jar ~/.clojure/clojure.jar

Leiningen (Clojure automation tool)

$ wget -O /usr/local/bin/lein
$ chmod 755 /usr/local/bin/lein

More information on Leiningen can be found on the Leiningen home page.


$ emacs
M-x nrepl-jack-in

On Consulting

rewinding git pull