cljfmt icon indicating copy to clipboard operation
cljfmt copied to clipboard

Spaces after argument vector and between elements in a vector not removed

Open ghost opened this issue 9 years ago • 3 comments

Hi,

Given

(first   [123    1 2 3 4 5]

When

 I run 'lein cljfmt fix'

Then

I would expect (first [123 1 2 3 4 5] as the result

Is there a setting for this ?

ghost avatar May 14 '15 06:05 ghost

This functionality currently doesn't exist in cljfmt, and it would have to be an optional feature if it did. Extra whitespace between forms is not unusual in Clojure code, as it's often used for lining up expressions, e.g.

(let [x  (first coll)
      xs (rest coll)]
  (cons x xs))

weavejester avatar May 14 '15 14:05 weavejester

See also #36.

weavejester avatar Jul 28 '15 03:07 weavejester

This was added in https://github.com/weavejester/cljfmt/pull/203, the option is called "remove-multiple-non-indenting-spaces".

or avatar May 10 '22 05:05 or