Function: cider-locate-running-nrepl-ports
cider-locate-running-nrepl-ports is a byte-compiled function defined
in cider-endpoint.el.
Signature
(cider-locate-running-nrepl-ports &optional DIR)
Documentation
Locate ports of running nREPL servers.
Combines three sources: a process scan for Leiningen servers, the open
CIDER REPL buffers, and a process scan for other nREPL servers (bare
nrepl.cmdline, babashka, lein trampoline). When DIR is non-nil,
nREPL port files in DIR's project are consulted too. Return a list of
lists of the form (project-dir port).
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-endpoint.el
(defun cider-locate-running-nrepl-ports (&optional dir)
"Locate ports of running nREPL servers.
Combines three sources: a process scan for Leiningen servers, the open
CIDER REPL buffers, and a process scan for other nREPL servers (bare
`nrepl.cmdline', babashka, `lein trampoline'). When DIR is non-nil,
nREPL port files in DIR's project are consulted too. Return a list of
lists of the form (project-dir port)."
(let* ((pairs (cider--running-nrepl-paths))
(pairs (if-let* ((c (and dir (cider-project-dir dir))))
(append (cider--path->path-port-pairs c) pairs)
pairs)))
(thread-last pairs
(mapcar (lambda (x)
(list (file-name-nondirectory (directory-file-name (car x)))
(nth 1 x))))
(seq-uniq))))