Setting Up Your Environment
Prerequisites: Installing Clojure
Clojure development revolves around an editor connected to a REPL, so you can evaluate any expression with a keystroke.
Editor
- Visual Studio Code + Calva — the most popular free choice. Calva starts ("jacks in") a REPL for your project, evaluates forms inline, and includes the clojure-lsp language server and structural editing.
- IntelliJ IDEA + Cursive — a full-featured Clojure IDE (free for non-commercial use).
- Emacs + CIDER and Neovim + Conjure — long-standing favorites of experienced Clojurists.
Structural editing
Editors for Lisps keep parentheses balanced for you (paredit or parinfer): you move, wrap, and split whole expressions instead of typing brackets by hand. Learn a few commands early — it makes the parentheses disappear from your attention.
Linting
clj-kondo (built into Calva and clojure-lsp) finds unused bindings, wrong arities, and typos as you type.
Starting a REPL in a terminal
$ clj
Clojure 1.12.6
user=> (+ 1 2)
3
user=> (str "Clojure" " rocks")
"Clojure rocks"
user=>
Press Ctrl + D (or Ctrl + Z then Enter on Windows) to quit. The plain terminal REPL is fine for a quick try; for real work, use your editor's REPL connection.
A minimal project
hello/
├── deps.edn {:deps {}}
└── src/
└── hello.clj
Run it with clj -M -m hello (Level 3 explains deps.edn and -M).