summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cider-client.el9
-rw-r--r--cider-eval.el8
-rw-r--r--cider-ns.el4
-rw-r--r--cider-repl.el2
-rw-r--r--cider-test.el8
-rw-r--r--cider.el6
6 files changed, 19 insertions, 18 deletions
diff --git a/cider-client.el b/cider-client.el
index 9912ac2a..964049f8 100644
--- a/cider-client.el
+++ b/cider-client.el
@@ -235,9 +235,12 @@ with respect to the bound values of \\=`*print-length*\\=`, \\=`*print-level*\\=
PPRINT-FN is the name of the Clojure function to use.
RIGHT-MARGIN specifies the maximum column-width of the pretty-printed
result, and is included in the request if non-nil."
- (nconc `("pprint" "true"
- "pprint-fn" ,(or pprint-fn (cider--pprint-fn)))
- (and right-margin `("print-right-margin" ,right-margin))))
+ (let* ((print-options (or cider-pprint-options (nrepl-dict))))
+ (when right-margin
+ (setq print-options (nrepl-dict-put print-options (cider--pprint-option "right-margin" cider-pprint-fn) right-margin)))
+ (append `("nrepl.middleware.print/print" ,(or pprint-fn (cider--pprint-fn))
+ "nrepl.middleware.print/stream?" "1")
+ (and (not (nrepl-dict-empty-p print-options)) `("nrepl.middleware.print/options" ,print-options)))))
(defun cider--nrepl-content-type-plist ()
"Plist to be appended to an eval request to make it use content-types."
diff --git a/cider-eval.el b/cider-eval.el
index 946d55ee..19cdbf24 100644
--- a/cider-eval.el
+++ b/cider-eval.el
@@ -278,11 +278,9 @@ into a new error buffer."
(cider-nrepl-send-request
(nconc '("op" "stacktrace")
(when (cider--pprint-fn)
- `("pprint-fn" ,(cider--pprint-fn)))
- (when cider-stacktrace-print-length
- `("print-length" ,cider-stacktrace-print-length))
- (when cider-stacktrace-print-level
- `("print-level" ,cider-stacktrace-print-level)))
+ `("nrepl.middleware.print/print" ,(cider--pprint-fn)))
+ (when cider-stacktrace-print-options
+ `("nrepl.middleware.print/options" ,cider-stacktrace-print-options)))
(lambda (response)
;; While the return value of `cider--handle-stacktrace-response' is not
;; meaningful for the last message, we do not need the value of `causes'
diff --git a/cider-ns.el b/cider-ns.el
index e89ed07b..b27fdeca 100644
--- a/cider-ns.el
+++ b/cider-ns.el
@@ -249,7 +249,9 @@ refresh functions (defined in `cider-ns-refresh-before-fn' and
"print-length" ,cider-stacktrace-print-length
"print-level" ,cider-stacktrace-print-level)
(when (cider--pprint-fn)
- `("pprint-fn" ,(cider--pprint-fn)))
+ `("nrepl.middleware.print/print" ,(cider--pprint-fn)))
+ (when cider-stacktrace-print-options
+ `("nrepl.middleware.print/options" ,cider-stacktrace-print-options))
(when (and (not inhibit-refresh-fns) cider-ns-refresh-before-fn)
`("before" ,cider-ns-refresh-before-fn))
(when (and (not inhibit-refresh-fns) cider-ns-refresh-after-fn)
diff --git a/cider-repl.el b/cider-repl.el
index 3adfb1d4..1d3e5304 100644
--- a/cider-repl.el
+++ b/cider-repl.el
@@ -873,7 +873,7 @@ nREPL ops, it may be convenient to prevent inserting a prompt.")
(nrepl-make-response-handler
buffer
(lambda (buffer value)
- (cider-repl-emit-result buffer value (not after-first-result-chunk) t)
+ (cider-repl-emit-result buffer value (not after-first-result-chunk))
(setq after-first-result-chunk t))
(lambda (buffer out)
(cider-repl-emit-stdout buffer out))
diff --git a/cider-test.el b/cider-test.el
index 5182b57b..e60eef2a 100644
--- a/cider-test.el
+++ b/cider-test.el
@@ -283,11 +283,9 @@ prompt and whether to use a new window. Similar to `cider-find-var'."
"var" ,var
"index" ,index)
(when (cider--pprint-fn)
- `("pprint-fn" ,(cider--pprint-fn)))
- (when cider-stacktrace-print-length
- `("print-length" ,cider-stacktrace-print-length))
- (when cider-stacktrace-print-level
- `("print-level" ,cider-stacktrace-print-level)))
+ `("nrepl.middleware.print/print" ,(cider--pprint-fn)))
+ (when cider-stacktrace-print-options
+ `("nrepl.middleware.print/options" ,cider-stacktrace-print-options)))
(lambda (response)
(nrepl-dbind-response response (class status)
(cond (class (setq causes (cons response causes)))
diff --git a/cider.el b/cider.el
index 75014b58..a70e3788 100644
--- a/cider.el
+++ b/cider.el
@@ -377,7 +377,7 @@ Throws an error if PROJECT-TYPE is unknown."
;; We inject the newest known version of nREPL just in case
;; your version of Boot or Leiningen is bundling an older one.
(cider-add-to-alist 'cider-jack-in-dependencies
- "nrepl" "0.5.3")
+ "nrepl" "0.6.0")
(defvar cider-jack-in-cljs-dependencies nil
"List of dependencies where elements are lists of artifact name and version.
@@ -401,10 +401,10 @@ Elements of the list are artifact name and list of exclusions to apply for the a
(defconst cider-latest-clojure-version "1.10.0"
"Latest supported version of Clojure.")
-(defconst cider-required-middleware-version "0.18.0"
+(defconst cider-required-middleware-version "0.21.0"
"The minimum CIDER nREPL version that's known to work properly with CIDER.")
-(defconst cider-latest-middleware-version "0.19.0"
+(defconst cider-latest-middleware-version "0.21.0"
"The latest CIDER nREPL version that's known to work properly with CIDER.")
(defcustom cider-jack-in-auto-inject-clojure nil