[folding] allow defining folding regions in user settings and/or extensions
See original GitHub issueWould it be able to abstract out the language specifics and treat code folding similar to how emmet
handles it…
i.e.
"emmet.includeLanguages": {
"php": "html",
"blade": "html",
"javascript": "javascriptreact"
},
So for code folding it could be…
"codeFolding.IncludeLanguages": {
"php": {
"openTag": "//#region",
"closeTage": "//#endregion"
},
...etc...
}
This is just an off the cuff idea for implementing this and I’m not sure that it’s possible, but the goal would be to not be dependent on the language plugin developers to implement the feature.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:38
- Comments:8 (6 by maintainers)
Top Results From Across the Web
region folding for VS Code - Visual Studio Marketplace
Visual Studio Code Custom Folding Extension. This extension enhances the default code folding abilities of Visual Studio Code editor.
Read more >vscode extensions - When folding a line in VS Code is it ...
This new feature gives users complete control over line folds, by total I mean, when & where. Fold Selection allows you to fold...
Read more >Collapse and expand regions of code - Visual Studio (Windows)
Learn how you can use the expand and collapse commands to work in outline ... Options > Environment > Fonts and Colors >...
Read more >The Problem With Code Folding - Coding Horror
Don't let them simmer. For me, the use of #region is one of those things. ... Folding is used to sweep code under...
Read more >VS Code tips — Folding all regions in a file - YouTube
Today's VS Code command: Fold all regionsQuickly collapse all regions in a file.Expand the individual regions you are intersected in or use ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is a sort of +1 comment. Please expose these settings directly in the user settings so that we don’t have to go mucking about with PRs for each and every language.
See also my comment from the Vim issue. Ideally there would also be a catch-all folding marker for all the files that don’t necessarily have a plugin, so that you can still get folding even if VS Code does not have explicit support for the specific file type.
Something like:
This helps with the use case of using VS Code as a generic editor, a replacement for Notepad++, Sublime Text, Vim, etc.
Is it possible to add to javascript-language-configuration.json the “editor-fold” tag ?