rksm / paredit.js

Generic reader and editor for s-expressions.
MIT License
107 stars 21 forks source link

More conventional indentation for Clojure #5

Closed jonspalding closed 9 years ago

jonspalding commented 9 years ago

Paredit.js indents threading and doto macros like this:

(-> foo
  bar
  baz)

(doto (JavaClass.)
  (.setSomeVal "foo")
  (.setSomeOtherVal "bar"))

When using in Clojure it's more conventional to indent like this:

(-> foo
    bar
    baz)

(doto (JavaClass.)
      (.setSomeVal "foo")
      (.setSomeOtherVal "bar"))

To support this I've removed /->/ and changed /^do/ to /^do$/ from the specialForms array.

jonspalding commented 9 years ago

Just noticed your comment on pull request #3.