vscode icon indicating copy to clipboard operation
vscode copied to clipboard

[folding] Provide a parameterized code folding command to be called from an extension

Open kaestlyn opened this issue 10 years ago • 2 comments

Is there a way with the new code folding for an extension to toggle a fold? I want to have my extension by default fold a comment that is at the top of all files.

kaestlyn avatar Mar 01 '16 17:03 kaestlyn

You can programmatically set the cursor and invoke the folding command. But by doing that you would assume that the folding regions are always computed the same way. We are planning to make this extensible and customizable.

To avoid you having to set the cursor, we could also add a command that takes the line number as argument.

aeschli avatar Mar 04 '16 16:03 aeschli

From the info in #32655 - I can accomplish what I will need so I am closing this issue.

kaestlyn avatar Nov 17 '17 15:11 kaestlyn