git clone 'git://github.com/symfrog/clojure-quick-repls.git'
Emacs functions for quickly creating Clojure and ClojureScript repls for a project.
Once the repls are created the usual CIDER commands can be used in either a clj/cljs buffer and the forms will be routed automatically via the correct connection.
So no need to manually switch connections!
The recommended way to install is via MELPA using
You can install
clojure-quick-repls using the following command:
M-x package-install [RET] clojure-quick-repls [RET]
or if you'd rather keep it in your dotfiles:
(unless (package-installed-p 'clojure-quick-repls)
If the installation doesn't work try refreshing the package list:
Make sure you have piggieback as a dependency in project.clj.
Also requires CIDER. The latest CIDER snapshot should be used since clojure-quick-repls maintains compatibility with the latest CIDER snapshot as closely as possible.
Open any Clojure file in the project that you wish to have Clojure/ClojureScript repls for, then
Do not attempt to execute clojure-quick-repls-connect twice, if you need to restart run cider-quit and then clojure-quick-repls-connect.
You can now connect the browser and execute any cider command in either a clj/cljs buffer and the forms will be routed to the correct connection.
If you would like to be able to switch to the relevant repl buffer based on if you are currently in a clj or cljs buffer then you need to set the custom variable cider-switch-to-repl-command to clojure-quick-repls-switch-to-relevant-repl
You can set a custom variable using:
After setting the custom variable you should have an form under custom-set-variables that looks like:
'(cider-switch-to-repl-command (quote clojure-quick-repls-switch-to-relevant-repl))
so a custom-set-variables form with only this variable set would look like:
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(cider-switch-to-repl-command (quote clojure-quick-repls-switch-to-relevant-repl)))
Distributed under the GNU General Public License, version 3