functional-koans/clojure-koans — pull request #69 by gaverhae (2014-01-25 11:29:57+00:00)
Title: Add Counterclockwise integration

At the cost of adding a little noise at the start of each file, this change makes it possible to enable docstrings and autocompletion in Eclipse (and, I suppose, other editors).

In my experience trying to get people to learn Clojure, Counterclockwise has been a great asset since it's already well-known in the Java world and now has [a ready-to-use bundle for each major platform](http://standalone.ccw-ide.org).

With this patch, the clojure-koans project can be easily cloned and imported from the standalone CCW (which include the git plugin); having a namespace declaration in each file allows the user to use the interactive features of CCW (a beginner probably only needs CTRL+ALT+S for evaluating the whole file) and to get access to the docstrings as tooltips.

As a reference, here are the instruction notes I have written for people wanting to learn Clojure inside my company:

The easiest way to get started with the Clojure syntax is probably the online Clojure koans. For better syntax highlighting, formatting, and docs, install the koans locally with the following steps:

--

1. Download the [Counterclockwise bundle](http://standalone.ccw-ide.org) for your platform.
2. Create a folder and unzip the bundle inside it.
3. Open the Counterclockwise executable.
4. Import [my fork of the Clojure Koans](https://github.com/gaverhae/clojure-koans) project into Eclipse. The git plugin is included in Counterclockwise. (Click Window -> Open Perspective -> Other... -> Git Repository Exploring -> Clone a git repository -> git@github.com:gaverhae/clojure-koans.git -> Next -> Next -> Choose path and click Finish -> Right click on the repository -> Import Projects... -> Next -> Finish.)
5. In the Java perspective, right click on the project and choose Leiningen -> Generic Leiningen Command Line and replace "" with "koan run". This sets up a program that will check the koans every time you save a file, and tell you which is the first koan that is not complete yet.
6. Still in the Java perspective, open the first koan (01_equalities.clj) and press CTRL+ALT+S to evaluate the file in a newly created REPL. This will enable documentation tooltips and autocompletion features.

Within Counterclockwise, CTRL+ALT+S evaluates the active file and CTRL+ENTER evaluates the top-level form under the cursor. Try it out, it'll be clearer than trying to explain that here.

--

It's a bit more than "unzip and go", but they also end up with a complete development environment ready to go. Note that this patch also solves issue #68 and probably any other editor, as it makes the project sort of "standards compliant".