File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -1390,15 +1390,22 @@ server buffer, in which case a new session for that server is created."
1390
1390
(plist-put :session-name ses-name)
1391
1391
(plist-put :repl-type 'cljs )))))
1392
1392
1393
+ (defvar-local cider-connect-default-params nil
1394
+ " Default plist of params to pass to `cider-connect' .
1395
+ Recognized keys are :host, :port and :project-dir." )
1396
+
1393
1397
;;;### autoload
1394
1398
(defun cider-connect-clj (&optional params )
1395
1399
" Initialize a Clojure connection to an nREPL server.
1396
- PARAMS is a plist optionally containing :host, :port and :project-dir. On
1397
- prefix argument, prompt for all the parameters."
1400
+ PARAMS is a plist optionally containing :host, :port and :project-dir.
1401
+ If nil, use the default parameters in `cider-connect-default-params' .
1402
+ When called interactively with a prefix argument, prompt for all the
1403
+ parameters."
1398
1404
(interactive " P" )
1399
1405
(cider-nrepl-connect
1400
1406
(thread-first
1401
- params
1407
+ ; ; Make sure to copy the list, as the following steps will mutate it
1408
+ (or params (copy-sequence cider-connect-default-params))
1402
1409
(cider--update-project-dir)
1403
1410
(cider--update-host-port)
1404
1411
(cider--check-existing-session)
You can’t perform that action at this time.
0 commit comments