feat: select the folding provider to use#157434
Conversation
|
@gjsjohnmurray Yes, it should help in conjunction of an extension like mine (Explicit Folding). |
|
@aeschli Hi, could you tell me if the PR needs any modifications? Thx |
|
+1 |
|
@aeschli Hi, what can I do for the PR to be merged? Thx |
|
Sorry, I didn't find time yet to review the PR... |
|
I made a few changes. The problem is that the folding code is in the editor layer which does not have the concept of extensions (it is also used in the Monaco editor). So when using the extension id in the foldingStrategy setting, we have to talk about an abstract id instead of the extension id. But then users will not understand it. |
|
@aeschli Thank you for the update. |
|
It's not about the import, which is fine to use, but the description of @daiyam Thanks for your help! |
|
@aeschli Thx OK, I understand. Since it is a Monaco's property, it should conform to its definition (defined by Monaco). |
|
Thanks for this. It would be even more awesome if one could restrict it to a file name or a partial file name, like Use cases are log files which all have their own standards, various config files which also differs a lot. The only way to distinguish them is by their file name. |
|
Its already possible to scope the setting to a specific language And if your files represent a certain type of xml files, you could think of defining a language for it. Thats of course something a extension would have to implement and is more than just the language definition. |
|
Alright thanks! For future reference, here's the issue tracking scoping by filename in the Explicit Folding extension. |
The PR allows to select the folding provider to use. The name of the provider is the name of the extension that provides it.
It follows the recommendations of @aeschli (#54200 (comment))