weavejester / cljfmt

A tool for formatting Clojure code
Eclipse Public License 1.0
1.11k stars 119 forks source link

Support for collapsing multiple metadata expressions #79

Open arrdem opened 8 years ago

arrdem commented 8 years ago

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 is nontrivial because of the left-to-right merge behavior of the reader as well as simple lexical volume.

I propose that the format of two or more nested meta expressions should be by convention the ^{} equivalent, with special exception made for ^foo type tags.

So:

But:

weavejester commented 8 years ago

I don't mind having this as an option, but I don't think it should be the default.