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

Align Map Items Incorrectly Formats Map Destructures #523

Closed
hindol opened this issue Dec 13, 2019 · 4 comments
Closed

Align Map Items Incorrectly Formats Map Destructures #523

hindol opened this issue Dec 13, 2019 · 4 comments

Comments

@hindol
Copy link

hindol commented Dec 13, 2019

Before format:

(let [{response-id :id :as response} (<!! source)]

After format:

(let [{response-id :id
       :as         response} (<!! source)]
@PEZ
Copy link
Collaborator

PEZ commented Dec 14, 2019

How do you think it should be formatted?

@hindol
Copy link
Author

hindol commented Dec 14, 2019

I would have preferred the former, i.e. the formatter should leave it as it is. As this is a binding, I like to keep the binding target in the same line. The binding source can be formatted over multiple lines though. That is just my opinion.

@PEZ
Copy link
Collaborator

PEZ commented Dec 15, 2019

Got it.

This is not easily fixed, though. The aligning happens in cljfmtand is experimental even there. The best place to influence the behaviour is probably this PR: weavejester/cljfmt#77

@bpringe
Copy link
Member

bpringe commented Nov 30, 2020

Going to close this since this fixing I think should go in cljfmt as Peter suggested. Please reopen if I'm wrong or misunderstood.

@bpringe bpringe closed this as completed Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants