Crystal 0.9.0 has been released!
This release introduces a built-in formatter that you can invoke with
crystal tool format.
It also comes integrated in our Sublime Text plugin,
and we encourage plugin writers to integrate it into other editors too.
Some things the formatter does:
- Applies a consistent indenting of two spaces
- Leaves no spaces before and after parentheses, leaves spaces after commas and between operators
- Leaves no more than two consecutive newlines
- Aligns expressions in the right side of an assignment
- Aligns consecutive comments, constants,
whenexpressions and hash literals
- Formats code inside doc comments, so also doc comments look nice and consistent
We encourage you to try it out! :-)
Another good thing is that shards is included in the official packages.