You can just call the formatting function directly.  :-)

iex(1)> Code.format_string!("blah 42") 
                                                                                
             
 
["blah", "(", "", "42", "", ")"]
iex(2)> Code.format_string!("blah 42") |> :erlang.iolist_to_binary()  
                                                               
"blah(42)"



On Thursday, October 12, 2017 at 2:35:45 PM UTC-6, [email protected] wrote:
>
> I apologize if this topic has already been covered.
>
> Have there been any discussions about adding support for reading/writing 
> via stdin/stdout to the new code formatter coming v1.6? 
>
> I've release an Atom package 
> <https://atom.io/packages/atom-elixir-formatter> that formats Elixir code 
> automatically on save using the new formatter. If the formatter supported 
> stdin/stout it would eliminate the need to write to a tmp file, which would 
> greatly reduce latency.
>
> I'm happy to help implement this, but wanted to see if there had been any 
> discussion already.
>
> Thanks in advance!
>
> Ron Green
>

-- 
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/c7102ea4-d4fe-4a83-b0f2-07feea48f577%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to