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

formatter read from stdin and print to stdout #1891

Closed
Dangerise opened this issue Feb 2, 2024 · 3 comments
Closed

formatter read from stdin and print to stdout #1891

Dangerise opened this issue Feb 2, 2024 · 3 comments

Comments

@Dangerise
Copy link
Contributor

Dangerise commented Feb 2, 2024

Specific Demand

I'm using helix editor which require formatter to read the source file from stdin and print the result to stdout

My discussion on Helix Editor

@ealmloff
Copy link
Member

ealmloff commented Feb 2, 2024

That was added in #1529. You can use dx fmt -f - to format code from stdin

@Dangerise
Copy link
Contributor Author

@ealmloff log will be printed to stdout, how to disable it ?

@ealmloff
Copy link
Member

ealmloff commented Feb 5, 2024

@ealmloff log will be printed to stdout, how to disable it ?

What log are you getting? I don't get any extra logs running this command:

echo "rsx\!{div{}}" | dx fmt -f -

You can change the log level with the DIOXUS_LOG environment variable. Error is the level with only the most critical logs:

export DIOXUS_LOG=error

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

No branches or pull requests

2 participants