You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No folding regions are detected, and the code can't be folded. R is similarly affected.
Notes:
Code folding is not universally broken; it works in R and Python if you switch to the less-fancy indentation based folding rules (Editor > Folding Strategy).
Code folding works using smart features in languages other than R and Python, such as CSS, so this is probably specific to those languages.
The Positron Code Cells extension is registering itself as the folding provider for everything (including R and Python). That means that when it finds no folding ranges in R or Python files, the editor doesn't draw any folding ranges.
Removing the registration on that line fixes the bug.
VS Code is able to blend folding ranges from multiple providers, but in this case what we really want to do is blend the folding range provider's results with the built-in indentation-based folding range provider. As far as I can tell that is not possible with the existing infrastructure.
To reproduce, add some code to a Python file that should be foldable, such as a function definition:
Attempt to fold the code, either with the keyboard shortcuts (https://code.visualstudio.com/docs/editor/codebasics#_folding) or by hovering over the gutter.
No folding regions are detected, and the code can't be folded. R is similarly affected.
Notes:
The text was updated successfully, but these errors were encountered: