Hi Chris, To quote one of the design principles behind the formatter [1]
> The second principle is to provide as little configuration as possible. This eases the formatter adoption by removing contention points while making sure a single style is followed consistently by the community as a whole. For this reason, I think the proposal is unlikely to be accepted. [1] https://hexdocs.pm/elixir/Code.html#format_string!/2-design-principles On Tuesday, February 5, 2019 at 10:38:26 AM UTC+1, Chris Hicks wrote: > > While it's not a style I have seen often in Elixir code, though I've seen > it elsewhere, I've found myself coding in a particular style that, for me > at least, increases the readability of my code and I'd love to see an > option in the formatter to allow for it. > > Essentially it all boils down to some extra spaces around characters such > as brackets and parens. > > Take, for example, this piece of code: > %{foo: "bar"} > > In my example it would look like: > %{ foo: "bar" } > > For method calls this code: > List.insert_at([], 2, 0) > > Would become: > List.insert_at( [], 2, 0 ) > > And a populated list: > [:a, :b, :c] > > Would become: > [ :a, :b, :c ] > > While these are simple examples, for denser code I find the style to be a > lot easier on the eyes and quicker to read. I can't think of, though there > might be, situations in which this would cause ambiguity issues for the > formatter so it seems like a low risk addition. > > Is this something that is a possibility? I'm willing to contribute if > there aren't any objections to the concept. > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/75384396-d031-4090-b028-fe8f2631a08f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.