summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authordpsutton <dpsutton@users.noreply.github.com>2018-01-03 08:52:31 -0600
committerBozhidar Batsov <bozhidar.batsov@gmail.com>2018-01-03 16:52:31 +0200
commitc5d4964961ffbd321afd72bea6cac2a8c7133463 (patch)
treec9030c91b4868e268db3582dee3c22bbea736082 /doc
parentf7079555b39f1506b7296ecdacd824ad1ec9ab87 (diff)
[Fix #1913] Allow toggling of current buffer connection (#2149)
Cljc buffers send their evals to both clj and cljs repls if available due to `cider-map-connections`. Toggling a current buffer's connection involves hiding the other connection. Previously, when toggling _again_, the original list was not consulted and only the truncated list, preventing the other connection from being found. This allows for the full list to be searched for the other buffer. In addition, a prefix dictates that the local connection list is discarded in favor of the full list, restoring the evaluation in both clj and cljs buffers (if both are present).
Diffstat (limited to 'doc')
-rw-r--r--doc/up_and_running.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/up_and_running.md b/doc/up_and_running.md
index 1277638c..9412f3ed 100644
--- a/doc/up_and_running.md
+++ b/doc/up_and_running.md
@@ -215,3 +215,17 @@ You should also check out
[leiningen]: http://leiningen.org/
[boot]: http://boot-clj.com/
[piggieback]: https://github.com/cemerick/piggieback
+
+## Working with cljc files
+
+Ordinarily, CIDER dispatches code from `clj` files to Clojure repls and `cljs`
+files to ClojureScript repls. However, `cljc` files have two possible connection
+targets. By default, CIDER tries to evaluate `cljc` files in all connection
+buffers, both `clj` and `cljs`. This can be modified with
+`M-x cider-toggle-connection-buffer`. Toggling this once will choose one of the
+connections as the primary, and successive calls to `M-x
+cider-toggle-connection-buffer` will alternate which connection to use. To
+restore evaluation to both connections, invoke `M-x
+cider-toggle-connection-buffer` with a prefix argument. If there is only a
+Clojure connection, no toggling will happen and a message will inform you that
+there are no other connections to switch to.