File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -1502,14 +1502,21 @@ server buffer, in which case a new session for that server is created."
1502
1502
(plist-put :session-name ses-name)
1503
1503
(plist-put :repl-type 'cljs )))))
1504
1504
1505
+ (defvar-local cider-connect-default-params nil
1506
+ " Default plist of params to pass to `cider-connect' .
1507
+ Recognized keys are :host, :port and :project-dir." )
1508
+
1505
1509
;;;### autoload
1506
1510
(defun cider-connect-clj (&optional params )
1507
1511
" Initialize a Clojure connection to an nREPL server.
1508
- PARAMS is a plist optionally containing :host, :port and :project-dir. On
1509
- prefix argument, prompt for all the parameters."
1512
+ PARAMS is a plist optionally containing :host, :port and :project-dir.
1513
+ If nil, use the default parameters in `cider-connect-default-params' .
1514
+ When called interactively with a prefix argument, prompt for all the
1515
+ parameters."
1510
1516
(interactive " P" )
1511
1517
(cider-nrepl-connect
1512
- (thread-first params
1518
+ ; ; Make sure to copy the list, as the following steps will mutate it
1519
+ (thread-first (or params (copy-sequence cider-connect-default-params))
1513
1520
(cider--update-project-dir)
1514
1521
(cider--update-host-port)
1515
1522
(cider--check-existing-session)
You can’t perform that action at this time.
0 commit comments