-
Notifications
You must be signed in to change notification settings - Fork 81
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
Make style = TRUE the default? #208
Comments
There's been a debate about whether to use options(reprex.style = TRUE) The thing is probably that most users don't do that or know how to do it. |
FWIW, I think (depending on how different an individual's coding style is from styler) this could be kind of confusing to the unsuspecting user. I'm thinking more about Q&A than GitHub issues, I put my code in, and now it looks all different! |
Ah, that's what the reprex could talk about it, like:
Keeping this open, because the original discussion is now a year old and styler has matured a lot since then. |
I'm certainly open to this but won't do anything for the small patch release I want to make in the very near future. It would be nice if reprex offered more support, via an add-in or helper function, for people who want to customize package-level options. We could be more bold with defaults if we had that. |
Maybe This would need to be implemented and is also connected to centralized documentation for options: #259 |
I know this is for interactive use primarily but isn't it generally considered bad practice to have code behaving differently depending on what other packages are installed? Do you plan to have similar behavior for other options? |
Well, there is precedent for this sort of thing for a worklow / interactive package. For example, httr and everything which depends on it uses a local web server for auth (vs out-of-bound auth) depending on whether httpuv is installed. I don't think it's a big deal either way. But we can also leave |
This might make the life of package maintainers a tad easier. Two things to remember:
scope = "line_breaks"
guarantees that the input is identical to the output as far as the parser is concerned. This will keep=
for assignment and won't add()
after function calls in pipes but is the safer alternative.CC @lorenzwalthert.
The text was updated successfully, but these errors were encountered: