I've tried setting the extensions list to `[".ex", ".exs"]`, but it looks 
like it isn't possible to write a custom formatter that would run on elixir 
files. The use case (something that Ash users are currently asking for) is 
a way to enforce consistency in their usage of the DSL using a formatter of 
some kind. I could go the route that surface originally went w/ a custom 
mix task for formatting, but being a formatter plugin would be *far* 
simpler.

So some potential ideas that would let me do this:

1. allow writing a plugin that takes .ex and .exs files and formats them 
either ahead of or behind the main formatter (ahead of would be better in 
this case because I'll want to run the formatter on the code after I've 
done my work).

2. allow specifying that `use`ing certain modules causes the contents of 
the using module to be formatted by my plugin, e.g `sigils: [], extensions: 
[".ex", ".exs"], using: [Ash.Resource]` (this would end up being 
configurable by end users because some Ash users have a resource wrapper, 
e.g `use MyApp.Resource`)

I'm happy to PR either of the above, or something else :)

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/e8503ea8-1b43-449a-b6dd-ac4d5c832e64n%40googlegroups.com.

Reply via email to