-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
Align a nested map #360
Comments
Yeah, there's room for improvement here. @Malabarba will you, please, look into this? |
Of course! |
Sorry, I lied. {:a {:a :a
:bbbb :b}
:bbbb :b}
{:a {:a :a
:bbbb :b}
:bbbb :b}
{:a {:a :a
:bbbb :b}
:bbbb :b} This behavior is acceptable to me. (Of course, it would be nice if the recursive version is optionally available.) |
Yes, exactly. |
@Malabarba However, I've found another problem... Run {:a {:a :a
:aaaaaaaaaaaaaaaaaaaaaa :a}
:b {:a :a
:aa :a}} Then: {:a {:a :a
:aaaaaaaaaaaaaaaaaaaaaa :a}
:b {:a :a ; <-
:aa :a}} It works with the following map: {:a {:a :a
:aaaaaaaaaaaa :a} ; <- decrease the number of `a`
:b {:a :a
:aa :a}} Probably, |
Btw, it's way more convenient to use |
Yeah, the automatic mode is very convenient, but some people seem not to prefer such a code style, so I hesitate to enable it globally. |
|
@Malabarba Thanks a lot! |
This prevents issues when aligning improperly indented code. Before, the region would be aligned while retaining the improper indentation. The follow-up indentation step would then break the alignment that was just performed. With this commit, we switch the order by indenting first then aligning. This retains compatibility with the test cases in #360.
Run
clojure-align
against the following code:Then you'll get:
Is this intended behavior?
align-cljlet
can do this in one step:The text was updated successfully, but these errors were encountered: