I’m quite happy with the new mix format task, except for my Ecto queries
Currently mix format would convert
query = from u in User, where: is_nil(u.team_id)
to
query =
from(u in User, where: is_nil(u.team_id))
and I’d like it to be
query =
from u in User, where: is_nil(u.team_id)
I looked at the docs, and there’s an option to make the formatter skip some parens, but I’m either doing it wrong or it’s not meant to work with 3rd party libs. Here’s my .formatter.exs:
Thanks @wojtekmach, well spotted! Yeah, I think I’ll wait for Ecto to adopt the formatter — there’s a lot of Schema/Query DSL which I’d prefer not to list manually.