cljfmt
cljfmt copied to clipboard
A tool for formatting Clojure code
My understanding is that standard Clojure style requires ```clj (defn foo [bar] ...) ``` rather than ```clj (defn foo [bar] ...) ``` Is there any way to enforce this using...
Right now there is no way to achieve this indentation: ```clojure (assoc {} :x "x" :a "z") ``` If the indentation for for `:block` was configurable, I believe this could...
We have a very large contingent of engineers in our company who don't want a single large whitespace commit because it obscures the git history. But we would like to...
Forms such as `^:foo ^:bar ^:baz qux` are legitimate, as are forms which mix multiple reader metadata ala `^{:foo 3 :bar 6} ^:baz ^{:qux 7} zork`. However reading such forms...
Most formatting tools provide a way to disable formatting on some expression. For instance various Java and Python tools allow comments at end of line such as `# nofmt` or...
the indent-size is hard-coded to 2: https://github.com/weavejester/cljfmt/blob/master/cljfmt/src/cljfmt/core.cljc#L163 It would be nice if the opts allowed this to be configurable.
By convention, defns with a single arity are indented approximately as such: ``` clojure (defn foo docstring? attr-map? [args] forms) ``` - If there is no docstring or meta and...
The indentation of `proxy` as part of a let-binding, by `clojure-mode`: ``` clj (proxy [SimpleJavaFileObject] [(URI. path) JavaFileObject$Kind/SOURCE] (getCharContent [_] (slurp res))) ``` cljfmt changes it to: ``` clj (proxy...
I wanted to use this with babashka as a library to check some paths recursively in a git hook, but noticed that the library fns (that don't call e.g. `System/exit`)...
I wanted to add .edn and .bb files to be formatted by cljfmt and it wasn't clear to me immediately why I can't use the regex expression in edn. Only...