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