Last active
July 28, 2018 13:41
-
-
Save lorenzwalthert/3ee7a3b794ae3e36188a3b7baff0646e to your computer and use it in GitHub Desktop.
Styling indention
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(styler) | |
guide <- tidyverse_style(scope = "line_breaks", indent_by = 8) | |
guide_with_indention_rules_only <- purrr::modify_at( | |
guide, 3, ~.x[grepl("indent", names(.x))] | |
) | |
styler::style_text( | |
"call( | |
x = 2 | |
) | |
a =3 | |
", transformers = guide_with_indention_rules_only) | |
#> call( | |
#> x = 2 | |
#> ) | |
#> a =3 | |
# Created on 2018-07-28 by the [reprex package](http://reprex.tidyverse.org) (v0.2.0). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment