-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
Automatically collapse "import" block in files. #20802
Labels
editor-folding
Editor code folding issues
feature-request
Request for new features or functionality
javascript
JavaScript support issues
typescript
Typescript support issues
Milestone
Comments
Right now folding is purely indentation based. What you are asking is language aware folding. |
Reopening to track the TypeScript/JavaScript specific part of this request from #21632 |
I wonder if it could be achieved by an extension... |
Depends on microsoft/TypeScript#22419 |
We have #40338 to think about configuring the initial collapse state. |
duplicate of #40338 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
editor-folding
Editor code folding issues
feature-request
Request for new features or functionality
javascript
JavaScript support issues
typescript
Typescript support issues
On larger projects you can end up with 10 or more lines of "import ... ;" statements at the top of a file.
It would be really great if vscode could detect if the there's a huge block of import statements at the top of a file and treat them as a collapsible region, and automatically collapse that region when you open a file.
At it's simplest I would define an "import block" as
It might also be worth having a minimum size before imports are treated as a block/region. E.g. 3 or more lines.
The text was updated successfully, but these errors were encountered: