Clojure with Intellij - oliyh/learning-clojure GitHub Wiki
Clojure on Intellij is currently in a state of transition. It initially had reasonable support that quickly became outdated and unloved. The plugins are currently incompatible with the latest version of Intellij. A new project called Cursive is currently being developed but isn't in public release yet.
- You have completed "Hello World"
- Download and install Intellij 12
- Run Intellij, and from Settings (Ctrl + Alt + S) > Plugins install "La Clojure" and "Leiningen"
- Restart Intellij
- Open the Settings dialogue again
- Search for Leiningen
- Point the Leiningen executable to where you installed Leiningen. The rest should fill in automatically
- If applicable ensure http_proxy and https_proxy are defined in your system environment variables - you may need to restart to get them to take effect.
set http_proxy=http://<username>:<password>@your.proxy:port
set https_proxy=http://<username>:<password>@your.proxy:portgit clone https://github.com/oliyh/learning-clojure.git- File > Open project > select the directory where the project resides - it should be recognised as a Clojure project
- The Leiningen plugin should sync the dependencies - you should see them appear in the project pane
- You may need to configure the SDK for the project: Open Module settings (Ctrl + Alt + Shift + S) - SDKs - Add an installed JDK
- Unless your key mappings are conflicted, press
Ctrl + Shift + D(or Tools > Start Clojure Console) to start a REPL - Open a Clojure source file e.g. core.clj
- Load it into your REPL using
Ctrl + Shift + L(or Tools > Clojure REPL > Load file to REPL) - Switch to the namespace used in the file,
(in-ns 'learning-clojure.core) - Execute a function
(hello)