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 @@ -1443,14 +1443,21 @@ server buffer, in which case a new session for that server is created."
14431443 (plist-put :session-name ses-name)
14441444 (plist-put :repl-type 'cljs )))))
14451445
1446+ (defvar-local cider-connect-default-params nil
1447+ " Default plist of params to pass to `cider-connect' .
1448+ Recognized keys are :host, :port and :project-dir." )
1449+
14461450;;;### autoload
14471451(defun cider-connect-clj (&optional params )
14481452 " Initialize a Clojure connection to an nREPL server.
1449- PARAMS is a plist optionally containing :host, :port and :project-dir. On
1450- prefix argument, prompt for all the parameters."
1453+ PARAMS is a plist optionally containing :host, :port and :project-dir.
1454+ If nil, use the default parameters in `cider-connect-default-params' .
1455+ When called interactively with a prefix argument, prompt for all the
1456+ parameters."
14511457 (interactive " P" )
14521458 (cider-nrepl-connect
1453- (thread-first params
1459+ ; ; Make sure to copy the list, as the following steps will mutate it
1460+ (thread-first (or params (copy-sequence cider-connect-default-params))
14541461 (cider--update-project-dir)
14551462 (cider--update-host-port)
14561463 (cider--check-existing-session)
You can’t perform that action at this time.
0 commit comments