Fork me on GitHub
#cider
<
2022-05-15
>
Lyn Headley11:05:01

I'm having some trouble getting my configuration for cider/cljfmt set up. It doesn't look like the options I am setting are taking effect. I have set:

(setq cider-format-code-options
        '(("remove-consecutive-blank-lines?" t)
          ("remove-multiple-non-indenting-spaces?" t)))
And inside this file I have run cider-format-buffer:
(ns temporale.network.test-format)

(def my-map {:a :b :c      :d})
I would expect this file to be reformatted like this
(ns temporale.network.test-format)

(def my-map {:a :b :c :d})
But instead nothing has changed.

yuhan17:05:44

This appears to be a bug, the cider--nrepl-format-code-request-map function returns an empty dict

ericdallo16:05:11

Is there any way to disable the Daad REPL exist. Reuse? (y or n) question? I found this is only related with reuse a old cider buffer right, and usually to me typing n or y would result in the same

yuhan17:05:54

There's a github issue about this: https://github.com/clojure-emacs/cider/issues/3076 Personally I also found it annoying and simply edited the function, replacing the (y-or-n-p ...) form with t https://github.com/clojure-emacs/cider/blob/3eff4f9b10f9b748d752ff70a68b0ffa3be06419/cider-connection.el#L772

ericdallo17:05:34

Thanks! Will keep an eye on that issue and probably do your workaround too :)