File tree Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 7
7
* Add first class support for Babashka (more warnings when you connect to ` babashka.nrepl ` ).
8
8
* Add support for nREPL 0.8's ` lookup ` op.
9
9
* Add support for nREPL 0.7's sideloading functionality.
10
+ * Add support for nREPL 0.8's ` ls-middleware ` op.
10
11
11
12
### Changes
12
13
Original file line number Diff line number Diff line change @@ -469,6 +469,18 @@ REPL defaults to the current REPL."
469
469
(mapc (lambda (op ) (insert (format " * %s \n " op))) ops)))
470
470
(display-buffer cider-nrepl-session-buffer))))
471
471
472
+ (defun cider-list-nrepl-middleware ()
473
+ " List the loaded nREPL middleware."
474
+ (interactive )
475
+ (cider-ensure-connected)
476
+ (let* ((repl (cider-current-repl nil 'ensure ))
477
+ (middleware (nrepl-middleware repl)))
478
+ (with-current-buffer (cider-popup-buffer " *cider-nrepl-middleware*" 'select nil 'ancillary )
479
+ (read-only-mode -1 )
480
+ (insert (format " Currently loaded middleware:\n " ))
481
+ (mapc (lambda (mw ) (insert (format " * %s \n " mw))) middleware))
482
+ (display-buffer " *cider-nrepl-middleware*" )))
483
+
472
484
473
485
; ;; Sesman's Session-Wise Management UI
474
486
Original file line number Diff line number Diff line change @@ -330,6 +330,7 @@ If invoked with a prefix ARG eval the expression after inserting it."
330
330
[" Close ancillary buffers" cider-close-ancillary-buffers
331
331
:active (seq-remove #'null cider-ancillary-buffers)]
332
332
(" nREPL" :active (cider-connected-p)
333
+ [" List nREPL middleware" cider-list-nrepl-middleware]
333
334
[" Describe nREPL session" cider-describe-nrepl-session]
334
335
[" Toggle message logging" nrepl-toggle-message-logging]))
335
336
" Menu for CIDER mode." )
Original file line number Diff line number Diff line change @@ -966,6 +966,10 @@ Optional argument TOOLING Tooling is set to t if wanting the tooling session fro
966
966
" Perform :ls-sessions request for CONNECTION."
967
967
(nrepl-send-sync-request '(" op" " ls-sessions" ) connection))
968
968
969
+ (defun nrepl-sync-request:ls-middleware (connection )
970
+ " Perform :ls-middleware request for CONNECTION."
971
+ (nrepl-send-sync-request '(" op" " ls-middleware" ) connection))
972
+
969
973
(defun nrepl-sync-request:eval (input connection &optional ns tooling )
970
974
" Send the INPUT to the nREPL server synchronously.
971
975
The request is dispatched via CONNECTION.
@@ -982,6 +986,10 @@ session."
982
986
" Get a list of active sessions on the nREPL server using CONNECTION."
983
987
(nrepl-dict-get (nrepl-sync-request:ls-sessions connection) " sessions" ))
984
988
989
+ (defun nrepl-middleware (connection )
990
+ " Get a list of middleware on the nREPL server using CONNECTION."
991
+ (nrepl-dict-get (nrepl-sync-request:ls-middleware connection) " middleware" ))
992
+
985
993
986
994
; ;; Server
987
995
You can’t perform that action at this time.
0 commit comments