Gerrnperl / outline-map

A visual, interactive outline map that combines the clarity of the outline with the intuitive overview of the minimap. Alternative Minimap.
https://marketplace.visualstudio.com/items?itemName=Gerrnperl.outline-map
MIT License
203 stars 14 forks source link

[FR] Region Support #43

Closed Servinjesus1 closed 9 months ago

Servinjesus1 commented 1 year ago

Requests to get regions (manual code folding breakpoints) to show up in the VSCode outline are being ignored. It would be incredible if this plugin implemented this instead.

For the large python scripts I work on, for example, I have lots of symbols being defined and sections I am trying to refactor, but aren't yet refactored into their own functions. While I work on that, being able to add #region Code Does This and #endregion around certain blocks can help me separate steps.

In Outline Map, it would be awesome if those regions showed up in the outline underneath the function they are a part of, and the symbols within that region showed up as symbols underneath the region. Additionally, regions within regions would be underneath their parent regions.

I'm not sure how to handle regions people put that start in one context and end in another (like start before a function and end within that function), maybe by default the region becomes the parent since it began above the function it ends in? That will have to be something we think about, but for a first attempt, just showing regions in the outline map would be incredible.

Gerrnperl commented 9 months ago

Thanks for your advice.

I had always thought that this feature will require a lot of work and should be completed by other extensions.

But no matter what, I have now implemented this feature.

Screenshot_20231013_201509

In theory, this feature now works in all languages.

I will release this version after some modifications.