-
Notifications
You must be signed in to change notification settings - Fork 39
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
Support for vertical alignment? #47
Comments
Looks like |
I personally would like that to be doable both ways if possible (via config), turn a vertical style code base into "normal" alignement or the inverse. |
This does seem like it would be a good optional feature. You would need to write a formatting rule that looks for maps and various kinds of bindings with alternating pairs, then figure out how much whitespace needed to be between each binding to align with the longest one. |
Excellent. Here's the prior art:
|
I'll take a stab at this when I have some time. |
Just kidding, @dparis is going to take a stab at it. I know this because I work with him. You're on the hook now, buddy. |
Update: I've gotten a first pass implementation up on my fork https://github.com/dparis/cljstyle/pull/1/files There are a few known cases that aren't working that I still need to fix, and I'd like to do a code quality pass, but overall seems to work decently. I'll submit a PR against upstream once those things are sorted out. |
Hi guys, i was just trying enable this in cljstyle and bumped in this issue and there is a help-needed label, is there a way to help in this? |
Clojure Mode for Emacs supports vertical alignment, as does Calva's formatter. Any thoughts on what it might take to add this to
cljstyle
?The text was updated successfully, but these errors were encountered: