Skip to content

Add option for Markdown-style hierarchical outline in .Rmd files #1692

@Streep

Description

@Streep

For .Rmd files, please add an outline mode that matches standard markdown heading hierarchy in VS Code (for .md files). The problem with the current full outline is that:

  1. Every function in every cell, along with normal section headers (#, ##, ###) are all put in the outline, making it difficult to find what you need in large .Rmd files;
  2. The sections are not hierarchical. Normal .md files have hierarchical list (folding out using [+]).

Ideally this would be configurable with options, e.g. headings-only, headings+chunks, and full code symbols, so users can keep R Markdown editing features without losing the normal hierarchical document outline.

In the meantime, users can switch off Rmd-support with the plugin by adding the following to settings.json, so that VSCode uses normal markdown outlines for .Rmd files (but no R-plugin functionality either):

{
 "files.associations": {
      "*.Rmd": "markdown"
   }
}

I guess this would need changes in the languageserver implementation?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions