It looks like formatting via clojure-lsp no longer picks up .cljfmt.edn -- both when running egtlot-format-buffer via a before-save-hook in Emacs, and when running clojure-lsp format in a terminal. However, when running lein cljfmt fix it does pick up .cljfmt.edn. (The project.clj contains :cljfmt {:load-config-file? true} .)
Is there any known regression / change around this? (I'm not sure when exactly this started happening.)
I'm prepared to believe I've messed up something in my environment, but I have no idea what!
Symptoms are similar to https://github.com/clojure-lsp/clojure-lsp/issues/1778
Let me check
All working https://github.com/ericdallo/clojure-sample/commit/2b26db5234564a0b5cd95c5e1089be789bc4c80e
fwiw my .cljfmt.edn looks like this: (Tonsky format FTW.)
{:paths ["src" "test" "common/src" "common/test" "client/src" "client/test" "dev-src"]
:indents {#re "^\\w" [[:inner 0]]}}
I'll see if I can do a minimal example.
I believe :indents was deprecated in favor of extra-indents as it overrides all cljfmt indents
I'd try that first
Using extra-indents didn't help, but thank you for the suggestion 🙂
Here's a repro.
https://github.com/stig/clojure-format-example/commit/a62d2ee37ec48b639090b780648398c819a4d583
Huh, maybe you're onto something... changing to 🙂 nah, it's just that we override all internal rules. But that makes me wonder if :extra-indents made cljfmt fix stop working tooclojure-lsp somehow sets the :legacy/merge-indents? true option. That would be weird, but I think it would explain what I'm seeing.