summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--cider.el12
2 files changed, 12 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 155fd494..e8ea3bbb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,7 @@
* [#2244](https://github.com/clojure-emacs/cider/issues/2244): Display the REPL type in the modeline.
* [#2238](https://github.com/clojure-emacs/cider/pull/2238): Allow specifying predicates for entries in `cider-jack-in-lein-plugins` and `cider-jack-in-nrepl-middlewares`.
* Add support for test selectors. If test all or all loaded is called with a prefix ask for filter test selectors in the minibuffer and only run those tests in the project which match the filters. Add variation of test namespace which asks for filter selectors the same way and only runs a subset of the namespace tests.
+* Add a configuration variable allowing to control whether server output should be redirected to the REPL (`cider-redirect-server-output-to-repl`).
### Bugs Fixed
diff --git a/cider.el b/cider.el
index e149f76e..9d658d6f 100644
--- a/cider.el
+++ b/cider.el
@@ -1139,6 +1139,15 @@ message in the REPL area."
"CIDER's version (%s) does not match cider-nrepl's version (%s). Things will break!"
cider-version middleware-version))))
+(defcustom cider-redirect-server-output-to-repl t
+ "Controls whether nREPL server output would be redirected to the REPL.
+When non-nil the output would end up in both the nrepl-server buffer (when
+available) and the matching REPL buffer."
+ :type 'boolean
+ :group 'cider
+ :safe #'booleanp
+ :package-version '(cider . "0.17.0"))
+
(defun cider--subscribe-repl-to-server-out ()
"Subscribe to the nREPL server's *out*."
(cider-nrepl-send-request '("op" "out-subscribe")
@@ -1158,7 +1167,8 @@ buffer."
(cider--check-required-nrepl-version)
(cider--check-clojure-version-supported)
(cider--check-middleware-compatibility)
- (cider--subscribe-repl-to-server-out)
+ (when cider-redirect-server-output-to-repl
+ (cider--subscribe-repl-to-server-out))
(when cider-auto-mode
(cider-enable-on-existing-clojure-buffers))
;; Middleware on cider-nrepl's side is deferred until first usage, but