maptz.vscode.extensions.customfolding icon indicating copy to clipboard operation
maptz.vscode.extensions.customfolding copied to clipboard

include foldable regions in outline

Open esotericist opened this issue 4 years ago • 3 comments

i'm doing a lot of work in c, and i was wanting a better way to do grouping of logical units within a file. this extension is a good help, but i was a little surprised that the regions don't show up in the outline. is it possible to do that?

esotericist avatar Nov 03 '21 01:11 esotericist

I'm not sure. I'll have to look into it. I'm sure it must be possible to interact with the outliner.

Do you have an example of how you think it should appear?

maptz avatar Nov 09 '21 23:11 maptz

i'm very sorry for never following up on this. basically what i'd like is to simply insert the name of regions in between functions in the outline. for instance i have in one file: image

and i'd like 'event prims' to somehow show up in between events_teardown() and prim(event_timer) in the outline here image

bonus points if i can click on it to go to the foldable region, but that's not actually a requirement.

basically i just want it to function as a visible divider between groups of logical units in the outline. (in this case, i am using foldable regions to group primitives for a virtual machine)

esotericist avatar Mar 20 '22 21:03 esotericist

I believe this might be possible.

According to this link it should be possible to add custom elements to the outline. I'll try to look into it a bit more.

maptz avatar Mar 20 '22 21:03 maptz

Hi, Due to time constraints, I'm not going to prioritise this enhancement for the moment on the extension. If you're able to help, then please let me know.

maptz avatar Jan 17 '23 22:01 maptz

I've added this as an experimental feature in version 1.0.20. It's behind an option flag, so you have to turn it on.

Add the following to your settings.json file:

{
   "maptz.regionfolder.showRegionsInOutline": true
}

maptz avatar Jan 18 '23 08:01 maptz