Skip to content

Commit 2a579b9

Browse files
committed
[Docs] Document cider-repl-auto-detect-type
1 parent 4b8d1a5 commit 2a579b9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

doc/modules/ROOT/pages/repl/configuration.adoc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,26 @@ for details.
265265
Alternatively, you can toggle this behaviour on and off using kbd:[M-x cider-repl-toggle-content-types]
266266
or the REPL shortcut `toggle-content-types`.
267267

268+
== REPL type detection
269+
270+
Normally CIDER would detect automatically the type of a REPL (Clojure or ClojureScript), based
271+
on information it receives from the `track-state` middleware, that's part of `cider-nrepl`.
272+
273+
In some rare cases (e.g. a bug in `cider-nrepl` or `shadow-cljs`) this
274+
auto-detection might fail and return the wrong type (e.g. Clojure instead of
275+
ClojureScript). You can disable the auto-detection logic like this:
276+
277+
[source,lisp]
278+
----
279+
(setq cider-repl-auto-detect-type nil)
280+
----
281+
282+
Afterwards you can use `cider-repl-set-type` to set the right type manually.
283+
284+
IMPORTANT: Using `cider-repl-set-type` without disabling
285+
`cider-repl-auto-detect-type` won't do much, as the REPL type will constantly be
286+
reset automatically by the `track-state` middleware.
287+
268288
== REPL history
269289

270290
* To make the REPL history wrap around when CIDER reaches the end:

0 commit comments

Comments
 (0)