quarto-dev / quarto-dev/quarto

Feature Request: Load parameter before executing `Run Cell` in VS Code / quarto-vscode extension

Open
#200 0 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
645
Forks
62
Avg merge
17h 42m
Merged PRs (30d)
13

Description

I am using VS Code and the quarto-vscode extension.

Consider this qmd file:

---
title: "Untitled"
format: html
params:
    value: 13
---

```{r}
cat(params$value)
```

When using Run Cell, I get the following error message:

r$> cat(params$value)
Error in cat(params$value) : object 'params' not found

This can be solved as indicated here https://github.com/REditorSupport/vscode-R/issues/504#issuecomment-1572360723

Would it be possible to include this in quarto-vscode, as it is an essential part of debugging parametrised reports?

Thanks,

Rainer

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Run Cell entry point in the quarto-vscode extension and compare its current behavior with the setup described in the linked vscode-R discussion. Use the supplied parametrised qmd example to verify that params are available before execution and that cat(params$value) runs without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.