Function: cider--start-nrepl-server
cider--start-nrepl-server is a byte-compiled function defined in
cider-jack-in.el.
Signature
(cider--start-nrepl-server PARAMS &optional ON-PORT-CALLBACK)
Documentation
Start an nREPL server.
PARAMS is a plist optionally containing :project-dir and :jack-in-cmd. ON-PORT-CALLBACK (optional) is a function of one argument (server buffer) which is called by the process filter once the port of the connection has been determined. The callback runs in the buffer that was current at the time of this call, so that subsequent connect logic sees the correct project context even if the user has switched buffers in the meantime.
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-jack-in.el
;;; User-level Jack-in commands
(defun cider--start-nrepl-server (params &optional on-port-callback)
"Start an nREPL server.
PARAMS is a plist optionally containing :project-dir and :jack-in-cmd.
ON-PORT-CALLBACK (optional) is a function of one argument (server buffer)
which is called by the process filter once the port of the connection has
been determined. The callback runs in the buffer that was current at the
time of this call, so that subsequent connect logic sees the correct
project context even if the user has switched buffers in the meantime."
(let ((orig-buffer (current-buffer)))
(nrepl-start-server-process
(plist-get params :project-dir)
(plist-get params :jack-in-cmd)
(when on-port-callback
(lambda (server-buf)
(if (buffer-live-p orig-buffer)
(with-current-buffer orig-buffer
(funcall on-port-callback server-buf))
(funcall on-port-callback server-buf)))))))