-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow reading from stdin #46
Comments
This is a great idea :) We will look into adding it. |
This feature is being added in #50 Thanks again for the great idea :) |
Thank you so much! Works great! In case any doom emacs users stumble over this issue: You can now use erlfmt to format erlang buffers by adding the following to (set-formatter! 'erlfmt "erlfmt -" :modes '(erlang-mode)) |
Happy to hear it works so well :) Maybe we should make even easier to spot this tip. |
This does not seem to work with rebar3: (set-formatter! 'erlfmt "rebar3 fmt -" :modes '(erlang-mode)) Could you update your comment to what you use now, incase there has been some change to |
I still use the same config. However, I don't use |
Even if reading from stdin with rebar3 worked fine, I think outputting to stdout might actually not - rebar3 output is quite verbose and sometimes quite random if things go to stdout or stderr. With standalone escript we can control it all, but running as a rebar3 plugin this is more complicated. |
It would be great if erlfmt supported reading from
stdin
(e.g. when passed--stdin
) so that it can be used by editor plugins such as https://github.com/lassik/emacs-format-all-the-code that pass a buffer's content to the formatter instead of operating on a file on disk.The text was updated successfully, but these errors were encountered: