-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outline: support for //#region
fold regions
#51364
Comments
(Experimental duplicate detection) |
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. |
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. Also, the folding provider doesn't define a name that could be used as a symbol name, has a separate lifecycle... |
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. |
Is there any extension support showing Typescript region in Outline? |
Most of the discussion here is probably outdated. Regions is a cross-language thing now AFAIK, so the data is available? |
We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding, and happy coding! |
Here it is then: please reconsider. |
Yes please, vscode team, consider, long code files need regions to organise groups of functions/methods |
For anyone else still looking for this feature, the Region Viewer Extension is good if you use regions primarily to navigate and fold large files and you're not really bothered about having the rest of the Outline contents inside the region: |
Any news on this? This is - imho - a very important feature for usability. |
in conjunction with hierarchical support in outlines.
Here's how Xcode is doing it:
The text was updated successfully, but these errors were encountered: