Hello! I've been happily using `mix format` since a while and wanted to add an extension to my text editor for it (well, there is one but it's not amazing).
Unfortunately I noticed there is no way for `mix format` to take a single file as input and output the result to stdout, it only changes the files directly on the filesystem. This works practically, but the editor has ugly flickers from reloading the file from the filesystem. Ideally, I'd be able to take some text as input and print the formatted file as output, while still using the whole `.formatter.exs` set in the project. A few ideas: - `cat myfile.ex | mix format`: when STDIN is used, mix will print to stdout instead of altering the file - `mix format --stdout myfile.ex`: mix will print to stdout. If a directory is passed or multiple files are passed, an error will be printed Does this sound reasonable? I can work on a PR myself if preferred, as long as the idea is a good one and an agreement is found for the interface -- 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/c7a6fc00-9053-4b53-a401-5aa8e9787bf9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
