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

Blank lines prevent correct vertical alignment #481

Closed
vemv opened this issue Aug 9, 2018 · 6 comments
Closed

Blank lines prevent correct vertical alignment #481

vemv opened this issue Aug 9, 2018 · 6 comments

Comments

@vemv
Copy link
Member

vemv commented Aug 9, 2018

Assuming I have vertical alignment turned on for maps, the following won't get aligned due to the blank line:

{:keys [foo bar

        baz]
 :or {quux 1}}

Tried with clojure-mode-20180809.1455.

Thanks - Victor

@Malabarba
Copy link
Member

Hi there. That's not a bug, it's a feature.
It's a conveniente way for you to avoid automatic alignment. It's useful when one of the keys in a map is much longer than the others.

@vemv
Copy link
Member Author

vemv commented Aug 10, 2018

Hi,

sounds reasonable, although Cursive doesn't implement that so huge whitespace diffs can get created.

Could the feature be made optional?

@cursive-ide
Copy link

@Malabarba How does this work? What is the logic that's applied?

@vemv
Copy link
Member Author

vemv commented Aug 16, 2018

The following patch appears to work:

image

Would it make sense a PR introducing a defcustom for this? Not sure if some other strategy would be preferred.

@bbatsov
Copy link
Member

bbatsov commented Aug 16, 2018

Yeah, this should be solved with a defcustom and default should remain what it's today.

@Malabarba
Copy link
Member

Sounds good. Sorry for not answering your last question.

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

4 participants