Skip to content
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

Closed
julien-c opened this issue Jun 7, 2018 · 15 comments
Closed

Outline: support for //#region fold regions #51364

julien-c opened this issue Jun 7, 2018 · 15 comments
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities *out-of-scope Posted issue is not in scope of VS Code outline Source outline view issues
Milestone

Comments

@julien-c
Copy link

julien-c commented Jun 7, 2018

in conjunction with hierarchical support in outlines.

Here's how Xcode is doing it:

capture d ecran 2018-06-07 a 11 37 44

@vscodebot
Copy link

vscodebot bot commented Jun 7, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@vscodebot vscodebot bot added the editor label Jun 7, 2018
@aeschli
Copy link
Contributor

aeschli commented Jun 8, 2018

Each language support defines what document symbols it returns and these are shown in the outline.

What language do you want the feature for?

@aeschli aeschli added the info-needed Issue requires more information from poster label Jun 8, 2018
@julien-c
Copy link
Author

Typescript, but any way of exposing a "section" symbol from a document would work, I guess.

@chrmarti chrmarti added feature-request Request for new features or functionality outline Source outline view issues and removed editor info-needed Issue requires more information from poster labels Jun 18, 2018
@jrieken jrieken assigned mjbvz and unassigned jrieken Jun 18, 2018
@mjbvz mjbvz assigned aeschli and unassigned mjbvz Jun 18, 2018
@mjbvz
Copy link
Collaborator

mjbvz commented Jun 18, 2018

@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

@aeschli aeschli assigned aeschli and jrieken and unassigned aeschli Jun 19, 2018
@aeschli
Copy link
Contributor

aeschli commented Jun 19, 2018

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...

@jrieken
Copy link
Member

jrieken commented Jun 25, 2018

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.

screen shot 2018-06-22 at 12 36 19

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?

@jrieken jrieken assigned mjbvz and unassigned jrieken and aeschli Sep 10, 2018
@jrieken
Copy link
Member

jrieken commented Sep 10, 2018

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.

@david50407
Copy link

Is there any extension support showing Typescript region in Outline?

@mjbvz mjbvz added this to the Backlog milestone Oct 4, 2021
@fuzzy76
Copy link

fuzzy76 commented May 20, 2022

Most of the discussion here is probably outdated. Regions is a cross-language thing now AFAIK, so the data is available?

@mjbvz mjbvz added the help wanted Issues identified as good community contribution opportunities label Aug 4, 2022
@qiulang
Copy link

qiulang commented Oct 19, 2022

Hi, what is the progress of feature request? I find WebStorm also supports this nicely while all the extensions for region on marketplace look quite shabby.

webstorm region viewer

@mjbvz mjbvz added the *out-of-scope Posted issue is not in scope of VS Code label Dec 5, 2022
@vscodenpa
Copy link

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!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2022
@fuzzy76
Copy link

fuzzy76 commented Dec 6, 2022

Here it is then: please reconsider.

@danqdinh
Copy link

Yes please, vscode team, consider, long code files need regions to organise groups of functions/methods

@insin
Copy link

insin commented Jul 12, 2023

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:

https://github.com/berabue/vscode-region-viewer

Screen Shot 2023-07-13 at 9 41 58 am

@JoElfner
Copy link

JoElfner commented Feb 1, 2024

Any news on this? This is - imho - a very important feature for usability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities *out-of-scope Posted issue is not in scope of VS Code outline Source outline view issues
Projects
None yet
Development

No branches or pull requests