Description
It would be nice to have the ability to configure the function used for formatting code (i.e cider-format-buffer
).
The relevant repl middleware function:
cider-nrepl/src/cider/nrepl/middleware/format.clj
Lines 12 to 16 in ce42411
We'd like to use https://github.com/kkinnear/zprint instead cljfmt.
For pretty printing, configuring the desired library is already supported:
cider-nrepl/src/cider/nrepl/middleware/pprint.clj
Lines 39 to 43 in f406dff
For now, and in case somebody else wants to use zprint with cider, we use the following approach to change reformat-string
:
(alter-var-root
#'cider.nrepl.middleware.format/reformat-string
(constantly (delay #(zprint/zprint-file-str % "<stdin>")))
Is the ability to configure this properly and out of the box, like for pretty printing, something the project would be interested in?