-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thread macro is not honored #248
Comments
Why should it be formatted that way? Can you give some justification? |
It's like macro body forms two spaces indented. foo here belongs to the body part. https://github.com/bbatsov/clojure-style-guide#body-indentation |
Similar to the fashion foo is indented here:
|
The section of the Clojure style guide you link to recommends that forms shouldn't be indented 4 spaces, but in your original post you have indented 4 spaces. Was that a typo? |
The issue is not about the format of -> but rather the inconsistency on how cljfmt handles as->. Cljfmt requires that the body form to be two space indents, for example,
The problem is, when the as-> is inside thread->, an implicit argument is placed; however, cljfmt seems to ignore it and formats it similar to the above case (2).
|
Ah, yes, that's a known missing feature. Currently cljfmt is not aware of the threading macros when handling block indentation. |
Duplicate of #223. |
Closed due to duplicate. |
Give the following code:
It should be formatted as:
Which also happens to be what emacs clojure mode does.
However, cljfmt thinks the code is already formatted.
Steps to reproduce:
clojure -Sdeps '{:deps {cljfmt {:mvn/version "0.8.0"}}}' -m cljfmt.main check example.clj
The text was updated successfully, but these errors were encountered: