its (arguably) nicer to configure than cljfmt and zprint
it can easily format code the same as cljfmt, so compatible with clojure-lsp formatting
one day I'll add cljstyle to MegaLinter
Using
check or fix
Configure
.cljstyle file (would be nice to be able to configure the location of this file)
key changes to support cljfmt style
list style (aligning lists on individual lines is 2 by default and cljfmt uses 1 (TBC)
Link to .cljstyle in practicalli/dotfiles repository
Summary
cljstyle is a binary so can be run anywhere, unlike cljfmt which is a libray and a leiningen plugin. So cljstyle is easier to install and use in more situations.
I found cljfmt very agressive and the configuration a little hard to understand without experimentation. cljstyle was much easier to understand and seems to have a much wider set of options. The default options are very close to that of the default cljfmt
I've raised an issue to add cljstyle to MegaLinter (and I'll check clj-kondo is using the latest version)
Using
cljstyle
to format Clojure codeRational
Using
check or fix
Configure
.cljstyle file (would be nice to be able to configure the location of this file)
key changes to support cljfmt style
Link to .cljstyle in practicalli/dotfiles repository
Summary
cljstyle is a binary so can be run anywhere, unlike cljfmt which is a libray and a leiningen plugin. So cljstyle is easier to install and use in more situations.
I found cljfmt very agressive and the configuration a little hard to understand without experimentation. cljstyle was much easier to understand and seems to have a much wider set of options. The default options are very close to that of the default cljfmt
I've raised an issue to add cljstyle to MegaLinter (and I'll check clj-kondo is using the latest version)