Yea, I believe this has come up before. The problem is .eex can be embedded
into anything: YAML, HTML, JSON, etc. So, in order for the formatter to be
able to format .eex files, it would 1) have to know what the surrounding
data is and 2) have a formatter for that specific tool in the language.

The first problem could be solvable by some heuristic, but could only solve
the problem for the types of files known. It's basically a problem with
infinite surface area. The second problem would mean the code base of core
would need to include some understanding of every surrounding format. So,
because of those reasons, I'd expect something like this to be rejected.

However, if the goal were to make the formatter extensible so that
formatting of files other than .ex and .exs can be handled by a third party
plugin, that might be more applicable for inclusion into core. That would
require some proposed design for how such a thing might work though.

Allen Madsen
http://www.allenmadsen.com


On Sat, May 30, 2020 at 8:39 AM Adam Lancaster <
a...@channelviewestates.co.uk> wrote:

> Hello
>
> It would be really great if the mix formatter could be configured to work
> with .eex templates. Would that be a bananas amount of work?
>
> Best
>
> Adam
>
> --
> 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/3c85260b-9435-42fb-9298-c7f79b3b5f7f%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/3c85260b-9435-42fb-9298-c7f79b3b5f7f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAK-y3CvELAj82crcY-6m6jdNJrXZNVQH1FgRsNQFtGV-vRZGEg%40mail.gmail.com.

Reply via email to