REditorSupport / REditorSupport/vscode-R
Preivew button use smart knit
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 139
- Avg merge
- 2h 46m
- Merged PRs (30d)
- 5
Description
Is your feature request related to a problem? Please describe.
I use following yaml header in my Rmd file:
---
title: "vignette"
output:
bookdown::html_vignette2:
fig_caption: true
number_sections: true
global_numbering: true
vignette: >
%\VignetteIndexEntry{vignette}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
knit: (function(input, ...) {
rmarkdown::render(
input,
knit_root_dir = dirname(input),
intermediates_dir = dirname(input)
)
})
---

when we use a custom knit function in the yaml header like above, the knit button will work well but the preview will stop with error since I set intermediates_dir in the yaml header knit function

Describe the solution you'd like
Preview buttom do the same of smart knit button
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the VS Code Preview and Smart Knit command entry points and compare how each invokes the R Markdown knit function, especially its handling of intermediates_dir. Done means Preview follows the Smart Knit behavior for this custom YAML knit function without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100