diff options
Diffstat (limited to 'cider-client.el')
-rw-r--r-- | cider-client.el | 9 |
1 files changed, 6 insertions, 3 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." |