Skip to content
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

Mention alternative argument align options #153

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ forms and macros that introduce local bindings (e.g. `loop`, `let`,
Use a single space indentation for function (macro) arguments
when there are no arguments on the same line as the function name.
<sup>[[link](#one-space-indent)]</sup>
* This one is used by default by [Emacs](https://github.com/clojure-emacs/clojure-mode#indentation-of-macro-forms),
while Cursive and Vim default to the alternative.
Pick one and stick to that.
<sup>[[Discussion]](https://github.com/bbatsov/clojure-style-guide/issues/126)</sup>

```Clojure
;; good
Expand All @@ -125,7 +129,11 @@ when there are no arguments on the same line as the function name.
bala
portokala)

;; bad - two-space indent
#(or
%1
%2)

;; option - two-space indent
(filter
even?
(range 1 10))
Expand All @@ -134,6 +142,10 @@ when there are no arguments on the same line as the function name.
ala
bala
portokala)

#(or
%1
%2)
```

* <a name="vertically-align-let-and-map"></a>
Expand Down