-
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
Unexpected indentation with let binding? #151
Comments
I think it's using rule 3 for the vector. And I think that's a bug, @oakmac? 😄 |
Thank you for the report. While the code here looks "off", I am not sure this is a bug with the formatter.
Yes - this is exactly what is happening in this case. Some more examples to clarify:
Maybe Rule 3 should not apply to Vectors? I need to give this a think. |
Curious if @shaunlebron has any thoughts about this? |
Eh, hiccups use vectors too, so I wouldn't disable rule three for them. Chris if you have a rule to columnate let-bindings (I think I saw this in your talk), I suppose there would be enough semantic detection in place to add an exception for this as well. |
This is a great point - thank you!
Standard Clojure Style does not vertically align There is enough information from the parser in order to determine "Does this look like a I also wonder if this a case of "is this a realistic scenario? or a theoretical concern?" Standard Clojure Style is not a pretty-printer, so if you pass in strange-looking code you may get some strange looking code as the output. |
Someone at the conj asked me what would happen if you passed in a file that was all on one line. In this case, Standard Clojure Style will pretty-print the zprint is an excellent project for "from scratch" pretty-printing. And some people / teams may prefer using it over Standard Clojure Style. |
What should happen in the following case after you format it?
See squint playground
The text was updated successfully, but these errors were encountered: