vscode-explicit-folding: Doesn't work in conjunction with indentation foldingStrategy.
Settings
"folding": {
"*": [
{
"begin": "{",
"end": "}",
}
]
}
Code Example
class Foo{
bar(){
return 1
}
baz()
{return 2}
}
"editor.foldingStrategy": "auto"
baris collapsed by the explicit strategy
(expected)bazis not collapsed
(expected, not matched by current strategies)

"editor.foldingStrategy": "indentation"
baris not collapsed by the explicit strategy
(unexpected, this is the titular issue)bazis collapsed by the indentation strategy
(expected)

About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (12 by maintainers)
@daiyam, I see!
Yes, I think it works well. I will continue to test and follow up soon.
Very exciting!
@FicoPrieto I’ve made some small changes. Here the updated file explicit-folding-0.10.0.vsix.zip
I’ve published the new version of the extension.
@OSHI7 You can try with the config:
@FicoPrieto Basically, I’m duplicating the builtin indentation provider into this extension. Since I don’t like the ideas to duplicate code and to add another provider into the extension. So I thought doing
"editor.foldingStrategy": "explicit & indentation"was better (still is better). But at the end of the day, there were no “immediate” solutions for user who wanted to stick to VSCode. Then, yesterday, I had the issue #36 (about jupyter python) and I thought that the extension was kinda useless for python devs. So I decided to give you the choice.@forivall @FicoPrieto I’ve changed my mind! The extension will support the config
{ "indentation": true }. It should be done in next days. So many users are already using it way beyond its initial purpose. Why not push it a little bit further 😉@forivall, to do what you propose would be outside the scope of this extension.
But that could be done if
editor.foldingStrategysupports a list of providers :autocan becomelanguage | indentationexplicit & indentationwould provide what you looking forI can implement it in my version of VSCode.