quarto-dev / quarto-dev/quarto

Feature Request: Add Outline Support for Named Code Sections in R Code Chunks

Open
#918 2 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

Summary

In Positron (but not RStudio), named code sections and headers (e.g., # Section One ----, # Section Two ====) within R code chunks in Quarto documents are recognized and appear in the document outline, aiding navigation. Currently, these sections are not detected in the outline feature when editing Quarto documents, resulting in a loss of navigation usefulness compared to RStudio (see video below).

Motivation
  • Improves Quarto IDE navigation for R users adopting Positron
  • Increases parity between RStudio, Positron, and Quarto experience
  • Helps users organize complex R scripts within Quarto documents
Example

A Quarto R code chunk such as:

#| label: test

# Section One ----
# Section Two ====
### Section Three ####

Should show “Section One”, “Section Two”, and “Section Three” in the outline panel for fast navigation, the way RStudio currently does.

Related Context
Feature Request

Please implement recognition of section headers inside R code chunks of Quarto documents, so they appear in the IDE’s Outline/navigation pane, matching RStudio user experience.

https://github.com/user-attachments/assets/45522318-b6d3-44fa-9884-1afe9f1b785c

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 locating the Quarto outline/navigation handling for R code chunks and how named sections are currently detected. Use the example headers in the issue as cases to verify, and consider the work complete when “Section One”, “Section Two”, and “Section Three” appear in the outline for an R chunk.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.