Created
April 11, 2024 08:43
-
-
Save ColinFay/ad8c788f8c8b246e2ae87d68a3aa3bce to your computer and use it in GitHub Desktop.
This file contains hidden or 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
cli::cat_rule("[.Rprofile] Sourcing user-wide rprofile") | |
options( | |
usethis.description = list( | |
`Authors@R` = 'person("Colin", "Fay", | |
email = "[email protected]", | |
role = c("aut", "cre"), | |
comment = c(ORCID = "0000-0001-7343-1846"))', | |
License = "MIT + file LICENSE" | |
), | |
usethis.full_name = "Colin Fay", | |
shiny.launch.browser = function(...) { | |
if (exists(".vsc.browser")){ | |
.vsc.browser(..., viewer = FALSE) | |
} else { | |
TRUE | |
} | |
}, | |
repos = "https://cran.rstudio.com" | |
) | |
options(styler.addins_style_transformer = "grkstyle::grk_style_transformer(use_tabs = FALSE)") | |
options(languageserver.formatting_style = function(options) { | |
grkstyle::grk_style_transformer(options, use_tabs = FALSE) | |
}) | |
# # two spaces | |
options(grkstyle.use_tabs = FALSE) | |
options(rmarkdown.html_vignette.check_title = FALSE) | |
options(styler.cache_root = "styler") | |
options(styler.cache_root = "styler-perm") | |
grkstyle::use_grk_style() | |
if (requireNamespace("prompt", quietly = TRUE)) { | |
cli::cat_rule("[.Rprofile] Setting up prompt") | |
options("continue" = " ") | |
prompt::set_prompt( | |
function(expr, value, ok, visible) { | |
paste0( | |
"📁 ", | |
crayon::blue( | |
crayon::bold( | |
basename(getwd()) | |
) | |
), | |
{ | |
if (file.exists(".git")) { | |
paste0( | |
" 🔨 ", | |
crayon::green( | |
crayon::bold( | |
system("git branch --show-current", intern = TRUE) | |
) | |
) | |
) | |
} else { | |
"" | |
} | |
}, | |
" \n> " | |
) | |
} | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment