From 42b38bc698d3c394c126ec9bb6b07daffe304953 Mon Sep 17 00:00:00 2001 From: olivroy <52606734+olivroy@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:18:56 -0500 Subject: [PATCH 1/2] Add yaml to RStudio snippets --- R/edit.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/edit.R b/R/edit.R index 84de7ae59..b62e12db8 100644 --- a/R/edit.R +++ b/R/edit.R @@ -142,7 +142,7 @@ edit_r_makevars <- function(scope = c("user", "project")) { #' @param type Snippet type (case insensitive text). edit_rstudio_snippets <- function(type = c( "r", "markdown", "c_cpp", "css", - "html", "java", "javascript", "python", "sql", "stan", "tex" + "html", "java", "javascript", "python", "sql", "stan", "tex", "yaml" )) { type <- tolower(type) From 4a854071f8e72672e59318e470d6cb86f4727e8d Mon Sep 17 00:00:00 2001 From: olivroy Date: Wed, 14 Feb 2024 08:17:55 -0500 Subject: [PATCH 2/2] Add news + redocument --- NEWS.md | 2 ++ man/edit.Rd | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index a819c3eb8..397a80cbb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # usethis (development version) +* `edit_rstudio_snippets()` now accepts yaml snippets (@olivroy, #1941) + # usethis 2.2.2 * Implicit usage of `numeric_version()` via comparison now always provides diff --git a/man/edit.Rd b/man/edit.Rd index c76d784a0..43fb62483 100644 --- a/man/edit.Rd +++ b/man/edit.Rd @@ -23,7 +23,7 @@ edit_r_makevars(scope = c("user", "project")) edit_rstudio_snippets( type = c("r", "markdown", "c_cpp", "css", "html", "java", "javascript", "python", - "sql", "stan", "tex") + "sql", "stan", "tex", "yaml") ) edit_rstudio_prefs()