EctoFieldFormatter (pretty_arrows v0.3.0)

Copy Markdown View Source

A mix format plugin that aligns the options in Ecto field declarations.

Use it instead of PrettyArrows if you don't want with clause alignment:

[
  plugins: [EctoFieldFormatter],
  pretty_arrows: [ecto: [parens: false, columns: 3]]
]

Only the :ecto section of :pretty_arrows is read. See PrettyArrows for the options.

Summary

Functions

Returns the Mix.Tasks.Format features for this plugin. mix format calls this function, so you don't need to call it yourself.

Formats source and aligns its Ecto field declarations. See PrettyArrows.format_ecto/2.

Functions

features(opts)

Returns the Mix.Tasks.Format features for this plugin. mix format calls this function, so you don't need to call it yourself.

format(source, opts \\ [])

Formats source and aligns its Ecto field declarations. See PrettyArrows.format_ecto/2.