Userspace extensions to the vscode-R extension.
cd /path/to/vscode-morrr
npm install
npm run compileThen install into VS Code:
code --install-extension /path/to/vscode-morrrnpm run package
code --install-extension vscode-morrr-*.vsixOr use Extensions: Install from VSIX... from the VS Code command palette and select the generated .vsix file.
When you switch to an .Rmd file that has a params: block in its YAML front matter, the extension automatically sends a corresponding params <- list(...) assignment to the R terminal. This makes params available immediately when you start running chunks, without having to source the whole document first.
Example front matter:
---
title: My Report
params:
dataset: "iris"
threshold: 0.05
verbose: true
---The extension will send:
params <- list(dataset = "iris", threshold = 0.05, verbose = TRUE)The injection fires once per file per session — switching back to the same file does not re-send. If no R terminal (R or R Interactive) is open at the time of activation, nothing is sent; open the terminal first and then re-activate the file.
This feature implements the userspace equivalent of vscode-R#1693.