cljfmt icon indicating copy to clipboard operation
cljfmt copied to clipboard

Identation off for protocol with metadata

Open vemv opened this issue 5 months ago • 0 comments

Hi,

I'm working on a custom defprotocol which can be tweaked via metadata.

I'm finding that cljfmt wants to add extra indentation if metadata is found, i.e.:

(defprotocol Chat
  :extend-via-metadata true
   (^{:schema [:or
               (success-with)
               (failure-with :error-details any?)]}
-   add-user-to-private-channel [this user-id channel-id])
+    add-user-to-private-channel [this user-id channel-id])

Emacs clojure-mode does not add the extra indentation. Probably we can consider cljfmt as the one being 'wrong' since defprotocol indentation should not vary in presence of metadata.

Thanks - V

vemv avatar Mar 17 '24 06:03 vemv