rebar3_format icon indicating copy to clipboard operation
rebar3_format copied to clipboard

Option for condensed style with | and ||

Open fowlay opened this issue 4 years ago • 1 comments

Currently, default_formatter formats this code…

[A|B] = [X||X <- Y]

…like this…

[A | B] = [X || X <- Y]

I would like it to be formatted like this…

[A|B] = [X||X <- Y]

An option for "condensed style" would be appreciated. When using paper width = 80 no space must be wasted :)

The condensed style may not be mainstream, but it is used in this old guide (although somewhat inconsistently): http://www.erlang.se/doc/programming_rules.shtml

fowlay avatar Nov 12 '20 17:11 fowlay

I like it!

I'm not sure how feasible this would be… considering what's discussed in #199

It might require a new formatter altogether.

elbrujohalcon avatar Nov 12 '20 17:11 elbrujohalcon