|
| 1 | +#' Package options |
| 2 | +#' |
| 3 | +#' These options can be set via [options()] and queried via [getOption()]. |
| 4 | +#' For this, add a `styler.` prefix (the package name and a dot) to the option name. |
| 5 | +#' Example: for an option `foo`, use `options(styler.foo = value)` to set it |
| 6 | +#' and `getOption("styler.foo")` to retrieve the current value. |
| 7 | +#' An option value of `NULL` means that the default is used. |
| 8 | +#' |
| 9 | +#' @usage NULL |
| 10 | +#' @format NULL |
| 11 | +#' |
| 12 | +#' @name styler_options |
| 13 | +#' |
| 14 | +#' @examplesIf FALSE |
| 15 | +#' getOption("styler.ignore_alignment") |
| 16 | +#' options( |
| 17 | +#' styler.ignore_alignment = TRUE, |
| 18 | +#' styler.quiet = TRUE |
| 19 | +#' ) |
| 20 | +#' getOption("styler.ignore_alignment") |
| 21 | +#' |
| 22 | +#' @section Options for the styler package: |
| 23 | +#' |
| 24 | +#' - `styler.addins_style_transformer`: character. |
| 25 | +#' The name of the style transformer to use in the addins. |
| 26 | +#' (default: `"styler::tidyverse_style()"`) |
| 27 | +#' |
| 28 | +#' - `styler.cache_name`: character. |
| 29 | +#' The name of the styler cache to use. |
| 30 | +#' (default: `r unlist(unname(read.dcf("DESCRIPTION")[, "Version"]), use.names = FALSE)`) |
| 31 | +#' |
| 32 | +#' - `styler.cache_root`: character. |
| 33 | +#' The directory where the cache files are stored. For more, see `help("caching")`. |
| 34 | +#' (default: `NULL`) |
| 35 | +#' |
| 36 | +#' - `styler.colored_print.vertical`: logical. |
| 37 | +#' It decides whether or not the output should be colored with `prettycode::highlight()`. |
| 38 | +#' (default: `TRUE`) |
| 39 | +#' |
| 40 | +#' - `styler.ignore_alignment`: logical. |
| 41 | +#' If `TRUE`, alignment, when detected, is ignored. For more, see `vignette("detect-alignment")`. |
| 42 | +#' (default: `FALSE`) |
| 43 | +#' |
| 44 | +#' - `styler.ignore_start`, `styler.ignore_stop`: character. |
| 45 | +#' Regular expressions to ignore lines that match them. For more, see `help("stylerignore")`. |
| 46 | +#' (default: `"styler: off"` and `"styler: on"`, respectively) |
| 47 | +#' |
| 48 | +#' - `styler.quiet`: logical. |
| 49 | +#' It decides whether or not to print an informative message about what the function is doing. |
| 50 | +#' If `TRUE`, no output is printed. |
| 51 | +#' (default: `FALSE`) |
| 52 | +#' |
| 53 | +#' - `styler.test_dir_writable`: logical. |
| 54 | +#' If `TRUE`, the package tests whether the directory is writable. |
| 55 | +#' (default: `TRUE`) |
| 56 | +NULL |
0 commit comments