vscode-R icon indicating copy to clipboard operation
vscode-R copied to clipboard

Switch the "Knit Rmd" button from `render()` to `run()` for documents with "runtime: shiny"

Open tarensanders opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. In RStudio, when you have an interactive document (i.e., the YAML contains runtime: shiny), the knit button changes from knitting to HTML to "Run document" (as described in their docs). Under the hood, it seems like the difference is that it switches from rmarkdown::render() to rmarkdown::run().

If you click the render button in vscode, vscode-R trys to render the document regardless of if it should actually be run, which just results in an error. I get the same error if I run rmarkdown::render() in the terminal (and everything runs fine if I switch that call to rmarkdown::run()).

Describe the solution you'd like It would be great if either 1) the button could change the call dynamically (i.e., if "runtime: shiny" is detected) or 2) a default keyboard shortcut existed for rmarkdown::run().

tarensanders avatar May 15 '22 10:05 tarensanders

Agreed that this could be better. I had a look at extending document types in #794, but admittedly haven't had a chance to revisit

ElianHugh avatar May 15 '22 11:05 ElianHugh

This issue is stale because it has been open for 365 days with no activity.

github-actions[bot] avatar May 16 '23 01:05 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar May 30 '23 01:05 github-actions[bot]