(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
Each language support defines what document symbols it returns and these are shown in the outline.
What language do you want the feature for?
Typescript, but any way of exposing a "section" symbol from a document would work, I guess.
@jrieken @aeschli I don't think this should be language specific. With folding providers and symbol providers, we already have both regions and which symbols they contain. If we want to support this feature, we should use these to construct the outline
The purpose of document symbols is very spcifically to provide the symbols for the quick outline as well as the new outline. Why trying to be smart on our side and merge in the two providers with very specific purposes. This just asks for trouble.
The language provider knows much better what document symbols are meaningful to the user.
Also, the folding provider doesn't define a name that could be used as a symbol name, has a separate lifecycle...
Why trying to be smart on our side and merge in the two providers with very specific purposes. This just asks for trouble.
Well, you don't need to merge but you can simply add your own tree. Similar to the unit-test-navigator https://marketplace.visualstudio.com/items?itemName=roblourens.unittest-navigate. However, that should and easily can be done as extension. It's the combination of an API command and the registration of a document symbol provider. That will give you two separate trees and one flat view in the quick outline.

If you want regions/pragmas be intermixed with document symbols you need to do this per language brain/extension.
@julien-c What is it you are looking for?
Giving this back to you @mjbvz. I think this should come from language extension themselves because only then the hierarchy looks nice, e.g. not multiple root nodes per extensions/scope and only with that we are sure things are correct.
Most helpful comment
@jrieken @aeschli I don't think this should be language specific. With folding providers and symbol providers, we already have both regions and which symbols they contain. If we want to support this feature, we should use these to construct the outline