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