sublime-lispindent icon indicating copy to clipboard operation
sublime-lispindent copied to clipboard

There's wrong indentation for clojure's "defrecord" and "deftype" macros

Open syeerzy opened this issue 11 years ago • 3 comments

(defrecord name-of-record [field-1 field-2] __ protocol-name-or-interface-name __ (function-name-1 [param-1 param-2] ________________ (body))) ;<------ WRONG indentation

also: deftype

this is a function definition, but it indents as a function call.

syeerzy avatar Jan 26 '14 06:01 syeerzy

This is something I would really want, but there doesn't seem to be a simple solution. I closed #7 because I didn't think it was viable.

odyssomay avatar Jan 26 '14 10:01 odyssomay

what a pity, this is driving me nuts! :) ended up using cljfmt

kernelp4nic avatar Feb 11 '15 13:02 kernelp4nic

I know it's not idiomatic but if you go with:

(defn entry
  [target owner]
  (reify
    om/IRenderState
    (render-state
      [this {:keys [value channel]}]
      (html
        [:div]))))

it works

kernelp4nic avatar Mar 06 '15 16:03 kernelp4nic