REditorSupport / REditorSupport/vscode-R
Bad highlighting of nested code chunks in R Markdown documents
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 139
- Avg merge
- 2h 46m
- Merged PRs (30d)
- 5
Description
vscode-R incorrectly highlights nested code chunks in R Markdown documents, stopping after the first closing chunk. E.g.:
````{verbatim}
```{r}
foo <- 1
```
````
produces:
I'd expect to have the outermost chunk (verbatim here) fully highlighted. Note that the quarto extension highlights nested code chunks properly. That would be great to get this work for .Rmd files too though.
My system:
- OS: macOS 12.3.1
- VSCode Version: 1.87.1
- R version: 4.3.2
- vscode-R version: 2.8.2
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
Reproduce the nested verbatim and r example in an .Rmd file with the vscode-R extension, then compare its highlighting with the Quarto extension. Trace the extension's R Markdown highlighting entry point; done means the outer verbatim chunk remains highlighted through its closing fence without changing ordinary chunks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, r, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100