Open kevinushey opened 1 year ago
This probably isn't necessary for MVP, if we want to defer this to later.
Since we are having quarto support, it would be nice if the folding rules also worked with fenced divs: https://quarto.org/docs/authoring/markdown-basics.html#divs-and-spans
In the following picture, it would be neat if line 19-23 could collapse, 26-30 could collapse and 17-32 could collapse
For clarity, i made the outside div with 4 colons, but that isn't strictly needed by quarto, so the columns work on a first-in-first-out kinda basis when they are created with the same number of colons
Here is RStudio IDE's guide to Code Sections: https://docs.posit.co/ide/user/ide/guide/code/code-sections.html#code-sections @kevinushey was this the functionality you had in mind?
We recently discussed modifying the newly added positron-code-cells extension to allow runtimes to better control code ranges and behaviors. However, we've not yet prioritized this work.
Since we are having quarto support, it would be nice if the folding rules also worked with fenced divs: https://quarto.org/docs/authoring/markdown-basics.html#divs-and-spans
In the following picture, it would be neat if line 19-23 could collapse, 26-30 could collapse and 17-32 could collapse
Hi @EmilHvitfeldt, for Quarto docs, the folding rules would be controlled by the Quarto extension. Would you mind logging that request with their backlog here? https://github.com/quarto-dev/quarto/issues
another use-case here is being able to fold test_that()
blocks in R package tests, (missing this one right now). May be related to https://github.com/posit-dev/positron/issues/1428.
Requested by a private beta user here: https://github.com/posit-dev/positron-beta/discussions/208
VSCode allows an extension to declare folding rules within
language-configuration.json
:https://code.visualstudio.com/api/language-extensions/language-configuration-guide#folding
However, it's fairly rigid -- each foldable region must have separate (and uniquely-matched) start and end boundaries. However, we'd likely want to support foldable sections -- for example:
For that reason, we'll probably need to implement folding rules in the LSP (unless we want to patch the VSCode behavior here)