Open jmcphers opened 11 months ago
See also discussion in #1043; the Quarto extension does provide some R Markdown functionality (but doesn't use R Markdown for rendering)
https://github.com/posit-dev/positron/issues/1043#issuecomment-1678333119
IMHO, it'd be great for the basic feature set to include drafting new R Markdown documents via package-provided templates. (The interface for doing this doesn't need to be as robust initially as RStudio's.)
Quarto is available on CRAN servers and we can advise folks to use Quarto for vignettes.
Bumping this to Future since I think we'll have to lean on the Quarto extension for R Markdown in the short term (and perhaps even for RC).
As outlined earlier in this issue, Quarto does provide some R Markdown functionality but doesn't use rmarkdown::render()
for rendering. For many situations, we believe this will be acceptable, for example, generating a preview of README.Rmd
or R package vignettes. (Note that we know the preview using Quarto will not be the same as, say, the final HTML vignettes as CRAN will render them.)
The remaining challenges around .Rmd
are most dramatic for situations where you really do need rmarkdown::render()
, like for custom R Markdown formats such as those outlined in https://github.com/posit-dev/positron/issues/1471#issuecomment-2038330413 and the following discussion. We could consider making a command in the R extension that literally uses rmarkdown::render()
and then somehow renders a preview (using Quarto??? or we resolve #2559?) in the Viewer pane.
Note that even today folks do have the ability to run rmarkdown::render()
from the console and then get their expected generated files. We are mostly talking about previews and UI affordances like keyboard shortcuts.
Goal
Support for R Markdown. We don't need to knock it out of the park, but we do need support for the basics:
This should look a lot like what the Quarto extension does since the two have a lot of similarities.
Context
via @jjallaire:
Via @hadley:
Via @DavisVaughan:
Slack threads:
https://positpbc.slack.com/archives/C05M2EZCPGR/p1695387572152429 https://positpbc.slack.com/archives/C05M2EZCPGR/p1695737806600509
Support features in the existing VS Code R language support plugin:
https://github.com/REditorSupport/vscode-R/wiki/R-Markdown