-
Notifications
You must be signed in to change notification settings - Fork 3
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
ns require indentation does not adhere to indentation rule 2 #87
Comments
I would expect that lists starting with keywords (function application in most cases) are treated as symbols for the purpose of indentation. |
I don't have a very strong opinion about this, it's just that my understanding of @tonsky's rule 1 is that it's only about symbols. |
I can see this either way. I think I prefer the 2 space indentation as it creates a stronger indentation impression, especially with reader conditionals. The good news is: as the |
@oakmac are you looking to apply that 2 space indentation to other lists-starting-with-a-keyword as well, i.e. treating keywords as symbols for this purpose as Noah suggests, or are you looking to only do 2 spaces for the ones in the ns form? My personal preference would be consistency between the two. |
My 2 cents:
we had to make exception (1 space) for when first place is list/vector/map. So now we have a situation:
But the rest is up to intepretation. One can make a case that then reader macro will look off:
Also lists when they are just lists:
So it looks like any list with non-symbol in first place should be 1-space indented? |
Some thoughts on this:
My personal preference is two-space indentation (how it works now), but I am leaning toward one-space indentation in order to match how to ns. This project has taken a lot of guidance from those recommendations, so I think it makes sense to follow it here. It also seems like one-space indentation is far more common than two space:
|
PR-130 adjusts |
is currently (
@chrisoakman/[email protected]
) formatted toas opposed to
Rule 2:
Edit: applies to other clauses as well:
The text was updated successfully, but these errors were encountered: