-
Notifications
You must be signed in to change notification settings - Fork 71
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
Enforce line break after + in ggplot2 #544
Comments
Can you point me to an existing rule in the tidyverse style guide that requires such a behavior? We generally only implement rules explicitly formulated there. Also, styler currently does not understand which namespace a token belongs to, i.e. it could not distinguish |
One thing you could do is to adapt the tidyverse style guide and add line breaks after |
@lorenzwalthert As a reference, the advice around line breaks for ggplot2 are now in the style guide as well: https://style.tidyverse.org/ggplot2.html. |
I am a bit surprised to be honest that Hadley has accepted style advise that is so specific to a package in the style guide 😄. Anyways I think we might derive more general rules for arithmetic remotes::install_github("r-lib/styler@569") and style your files with it and tell me if the result is satisfying. Can you do that? |
- Break line in ggplot2 calls (#544).
Would love to see this feature added, easier to manage typing when using notebooks |
@vimal739 This feature is available in the latest CRAN release and any CRAN release after December 18, 2019. |
@lorenzwalthert Wow that's great, thanks much! |
I'd love to see
styler::tidyverse_style()
enforce a line break after+
in ggplot2 code, i.e.should be
Is this a feasible feature to implement?
The text was updated successfully, but these errors were encountered: