quarto-dev / quarto-dev/quarto

VS Code extension: Rmd does not export symbols

Open
#488 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The Quarto extension fails to provide symbols for an R Markdown document such as scratch.Rmd (content below). The issue prevents:

  • the breadcrumbs from being shown
  • the outline from being displayed
  • the Jump to symbol navigation shortcut box being populated

image

This occurs in
Positron Version: 2024.07.0 (Universal) build 21
Code - OSS Version: 1.90.0
Commit: 82b335e27545e804b7fd806db00477a6eb49951d
Date: 2024-07-09T04:32:26.804Z
Electron: 29.4.0
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin arm64 23.5.0

Also in Quarto v1.113.0 in VS Code

If I install REditorSupport.r extension then the R Markdown document symbols appear as normal, but not in the Quarto extension.

This issue was previously raised as Positron Issue #3982 and now transcribed here at the request of @juliasilge

Code for scratch.Rmd for testing is below:

---
title: "A wonderful R Markdown document"
output:
  html_document:
    math_method: katex
---

```{r echo = FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

Here is some math:

$1 + 1$

When you render this file, a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

```{r cars}
summary(cars) 
```

## Including Plots

You can also embed plots, for example:

```{r pressure, echo=FALSE}
plot(pressure)
```

Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.

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 by reproducing the missing symbols in scratch.Rmd with the Quarto extension and compare the result with the REditorSupport.r extension. Trace the Quarto extension's symbol handling, then verify that breadcrumbs, the outline, and Jump to Symbol are populated for the supplied document.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.