Skip to content

Commit 21678c6

Browse files
committed
Add changelog and documentation
1 parent 9601d86 commit 21678c6

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

doc/modules/ROOT/pages/basics/up_and_running.adoc

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ provided by your project's build tool (Gradle, Maven, etc).
341341
After you get your nREPL server running, go back to Emacs and connect
342342
to it: kbd:[M-x] `cider-connect` kbd:[RET]. CIDER will
343343
prompt you for the host and port information, which should have been
344-
printed when the previous commands started the nREPL server in your
344+
printed when the previous commands started fsthe nREPL server in your
345345
project.
346346

347347
TIP: In Clojure(Script) buffers the command `cider-connect` is bound to kbd:[C-c C-x c s].
@@ -358,6 +358,22 @@ reads for the host and port prompts when you invoke
358358
("host-b" "7888")))
359359
----
360360

361+
If you wish to bypass the prompts entirely, you can configure the variables
362+
`cider-connect-default-params` and `cider-connect-default-cljs-params`
363+
on a per-project basis using https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html[.dir-locals.el].
364+
365+
The following configuration allows you to type kbd:[M-x] `cider-connect-clj&cljs` kbd:[RET] and instantly connect to both JVM and shadow-cljs REPLs without answering any prompts – useful when the project always uses the same fixed endpoints for its nREPL servers.
366+
367+
[source,lisp]
368+
---
369+
((clojure-mode
370+
. ((cider-connect-default-params . (:host "localhost" :port 1234))
371+
(cider-connect-default-cljs-params . (:host "localhost" :port 5678))
372+
(cider-default-cljs-repl . shadow))))
373+
---
374+
375+
Note that the universal argument kbd:[C-u] can be used before a command to override these settings and force the prompts to be displayed.
376+
361377
== Working with Remote Hosts
362378

363379
While most of the time you'd be connecting to a locally running nREPL

0 commit comments

Comments
 (0)