LightTable/Clojure — pull request #29 by cldwalker (2014-11-02 17:14:19+00:00)
Title: One keystroke cljs eval

This is an attempt to make a clojurescript eval that just works for your project, much like clojure's eval and inspired by realizations in #8. Try it out:

* Clone the Clojure plugin and checkout this branch.
* `lein new mies-om om-test`
* `cd om-test && lein cljsbuild once`
* Open LightTable and eval a line e.g. `(enable-console-print!)`
* An internal browser auto-opens and the line is evaled. You now have a cljs repl to your project (not LT's)!

The client auto-magically works by looking for a number of common places for index.html and opening it. We can make this a configurable behavior as well as disabling this feature entirely for power users. We could also make opening to an external browser a configurable behavior.

As for implementation, I resorted to a new connection as we may want to open an internal or external browser. We could reuse the [existing internal browser connection](https://github.com/LightTable/LightTable/blob/49f98f8ed8fc723be16a7f36111d8047d1c09e06/src/lt/objs/browser.cljs#L515) and same for the external one. However, that will require changing their :connects to kick off behaviorw and this feature will block until the next release. As for placement of the :connect call, I tried placing it in `:exec.cljs` behavior to less success. Current placement seems reasonable. If we don't like the tag check, we could change :create to point to a trigger e.g. `:create-eval-connection`

@LightTable/committers Would love to get feedback. I'm also going to open this up to the community on a mailing list thread.