Skip to content
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

Format to stdout #258

Open
DamienCassou opened this issue Oct 15, 2024 · 3 comments
Open

Format to stdout #258

DamienCassou opened this issue Oct 15, 2024 · 3 comments

Comments

@DamienCassou
Copy link

Some general-purpose formatting tools prefer language-specific formatting tools to write to stdout:

By default, reformatter.el expects programs to read from stdin and write to stdout, and you should prefer this mode of operation where possible

Would it be possible for nixfmt to have a mode of operation writing to stdout?

@infinisil
Copy link
Member

infinisil commented Oct 15, 2024

On my phone right now so I can't test, but I'm pretty sure that works by default!

@dasJ
Copy link
Member

dasJ commented Oct 15, 2024

@infinisil I think only when formatting stdin, not when formatting a file on disk. Not sure if that's what's needed here though since the quote above expects that exact behavior

@DamienCassou
Copy link
Author

I think only when formatting stdin

this is good enough for me. Thank you. Maybe the --help could mention that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

3 participants