branch: elpa/cider
commit b1ab1e4f6b2c4fa553e2dd9edc5a4e6cdd783375
Author: yuhan0 <qyth...@gmail.com>
Commit: Bozhidar Batsov <bozhi...@batsov.dev>

    Add changelog and documentation
---
 CHANGELOG.md                                      |  2 ++
 doc/modules/ROOT/pages/basics/up_and_running.adoc | 16 ++++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8daf24610a..1c30e87500 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,8 @@
 
 ### New features
 
+- [#3359](https://github.com/clojure-emacs/cider/pull/3359): Add customizable 
default connection params
+
 ### Changes
 
 - Bump the injected `cider-nrepl` to 
[0.56.0](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0560-2025-05-29).
diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc 
b/doc/modules/ROOT/pages/basics/up_and_running.adoc
index 7bb808f79e..e6e82cf639 100644
--- a/doc/modules/ROOT/pages/basics/up_and_running.adoc
+++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc
@@ -358,6 +358,22 @@ reads for the host and port prompts when you invoke
     ("host-b" "7888")))
 ----
 
+If you wish to bypass the prompts entirely, you can configure the variables
+`cider-connect-default-params` and `cider-connect-default-cljs-params`
+on a per-project basis using 
https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html[.dir-locals.el].
+
+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.
+
+[source,lisp]
+---
+((clojure-mode
+  . ((cider-connect-default-params . (:host "localhost" :port 1234))
+     (cider-connect-default-cljs-params . (:host "localhost" :port 5678))
+     (cider-default-cljs-repl . shadow))))
+---
+
+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.
+
 == Working with Remote Hosts
 
 While most of the time you'd be connecting to a locally running nREPL

Reply via email to