Mix Format

May 17, 2018

Following in the footsteps of Go, Elixir now has a standard formatter as of Elixir v1.6. Create a file called .formatter.exs with the inputs for your project, like this:

[
  inputs: [
    "mix.exs",
    "{config,lib,test}/**/*.{ex,exs}"
  ]
]

and you can now run mix format to format your code in a standard style. An example .formatter.exs will be added to new projects created using mix new.