2 ms·
Basic instructions. I use cmd for the shortcuts below, substitute ctrl on non-mac platforms. 1. Install Leiningen http://leiningen.org/ http://leiningen.org/ y
by grayrest 13y ago
Basic instructions. I use cmd for the shortcuts below, substitute ctrl on non-mac platforms.
1. Install Leiningen http://leiningen.org/ http://leiningen.org/ you do not need to install clojure, lein will grab clojure for you.
2. `lein new playground` from the command line to create a 'playground' project
3. Open Light Table
4. ctrl-space `woto` for "Toggle Workspace tree"
5. Add the playground project folder you just created
6. cmd-o `core.clj` to open the main clojure file for the project
7. On an empty line type `(+ 1 1)` and hit cmd-enter
Things will grind away for a while as all the dependencies are downloaded and the JVM starts up. Get a cup of coffee or something. Eventually you'll see a green `2` show up.
You can then type anything in the tutorial and hit cmd-enter to evaluate it or cmd-shift-enter to evaluate the entire file. Think of the file as a shell with an editable history instead of something you'd want to commit to source control.
Documentation is searchable via ctrl-shift-d or moving your cursor on top of a function name and hitting ctrl-d. Autocomplete is available on tab, you can jump to definition with cmd-. and back with cmd-,
- dserban 13y agoVery useful! Additional question: I noticed how on the clojurescreencasts site the author of the videos uses InstaREPL in split screen mode. I couldn't figure out how to do that with my own installation of LT. Do you know?
- grayrest 13y agoThe split is 'Tabset: Add a tabset' and you can just drag the instarepl tab over.