- Run the installer (make sure your JDK is up to date). If you try “lein repl” in a command line it will give you an error.
- Grab the latest lein.bat file.
- Update the LEIN_VERSION in the bat file to what you want to get. The default should be fine, but you can check here for a list of the latest releases.
- Drop the bat file into “C:\Users\<YourUserName>\.lein\bin” or wherever you installed Leiningen. Replace the old file.
- In the command line run “lein self-install” it should pull the standalone jar file.
- Now if you type “lein repl” into your command line the Clojure REPL should start up. And you’re good to go.
The next thing you should do is figure out which editor or IDE to use. There are solid Clojure plugins for Eclipse and IntelliJ but I found myself overwhelmed with tons of Java features that I wasn’t going to use. There are syntax highlighting plugins for Sublime and Atom but I wanted something a little bit more helpful and IDE-like so I settled on LightTable. LightTable’s really easy to get going with and it has good documentation, but if you really just want to jump into things, the least you need to do is:
- Create a new project with Leiningen: “lein new myproject” (make sure you’re in the directory you want to be in).
- Then in LightTable go to View -> Connections -> Add Connection -> Clojure. And then navigate to the project.clj file you just created with lein.
After the project connects, you can open up the generated core.clj file and play around the instarepl, and that should be enough to get you started.