Closed sirmspencer closed 1 year ago
I'm using cljfmt via clojure-lsp, and I can set regex rules using #re ".*"
note the #re
tag. Not sure if this is done by clojure-lsp or cljfmt.
@leafgarland Where you able to set that regex rule, but then also other rules that supersede the regex?
You should be able to add it to your configuration, so in cljfmt.edn
or cljfmt.clj
, or in your Leiningen project.clj
file. See the README for an explanation of how to configure.
This does work. Its been a while so I don't remember why it didn't work before.
Allow an indent rule to be created for all functions / macros that are not defined here or in the :indents map.
Half of our team is using Cursive, which favors this form for multi line function calls. Note the two space indent.
The indent rule to replace all doesnt work
for two reasons. 1) regex is invalid when using a .cljfmt.edn file, and 2) Cursive follows the same indent rules for almost every rule that is a default for cljfmt.because Cursive only uses the default 2 space indent for unknown functions. Globally changing all forms to[:block 0]
changes more code than not. Something like this maybe