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

Region/folding is not supported? #1232

Closed
stt106 opened this issue Oct 2, 2018 · 10 comments
Closed

Region/folding is not supported? #1232

stt106 opened this issue Oct 2, 2018 · 10 comments
Labels
upstream in dart / flutter Needs changing in Dart or Flutter

Comments

@stt106
Copy link

stt106 commented Oct 2, 2018

I see that VS Code supports region/folding for some language e.g.
//#region My Region
some code
//#endregion

But dart is not supported. Am I doing something wrong or this will be added later?

@DanTup
Copy link
Member

DanTup commented Oct 2, 2018

This is not currently supported. As far as I'm aware, //#region is not a Dart construct so these are just treated as comments and won't generate foldable regions.

We implemented folding in the Dart Analysis Server in the SDK so that it can be re-used across editors so supporting this would have to come from the SDK, so this should be raised in the SDK repo.

@stt106
Copy link
Author

stt106 commented Oct 2, 2018

ok thanks.

@stt106 stt106 closed this as completed Oct 2, 2018
@DanTup DanTup added the upstream in dart / flutter Needs changing in Dart or Flutter label Oct 2, 2018
@polotto
Copy link

polotto commented Jul 12, 2019

//#region and //#endregion work in the Android Studio and Intellij as well.

@engmsaleh
Copy link

@angelopolotto Didn't work in VCode

@polotto
Copy link

polotto commented Dec 3, 2019

@engmsaleh Don't work in VSCode, only Android Studio and Intellij.

@ModProg
Copy link

ModProg commented Jun 22, 2020

Not the real solution for the problem, but for those just searching for a workaround:
https://marketplace.visualstudio.com/items?itemName=maptz.regionfolder
Its a Addon that works for many languages, including dart.

@ali80
Copy link

ali80 commented Feb 9, 2021

Not the real solution for the problem, but for those just searching for a workaround:
https://marketplace.visualstudio.com/items?itemName=maptz.regionfolder
Its a Addon that works for many languages, including dart.

It's a real solution for me :), works very well.

@philanderson888
Copy link

Not the real solution for the problem, but for those just searching for a workaround: https://marketplace.visualstudio.com/items?itemName=maptz.regionfolder Its a Addon that works for many languages, including dart.

This one worked for me also, and I really love regions, so thank you very much for mentioning.

@Hixie
Copy link

Hixie commented Dec 8, 2023

(breadcrumbs for the next person: dart-lang/sdk#34795)

@DanTup
Copy link
Member

DanTup commented Dec 9, 2023

FWIW, it's not what was asked here but it's related.. VS Code now allows folding of arbitrary blocks of code (regardless of language), but you need to create them through a command, they're not marked in the source code:

folding.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream in dart / flutter Needs changing in Dart or Flutter
Projects
None yet
Development

No branches or pull requests

8 participants