I am trying to create simple extension for vs code that need to collapse specific cells
I found this option
vscode.commands.executeCommand('editor.fold', fold={levels: 1, selectionLines: lines});
but I cant figure out how to set it to collapse one line (the start of the cell) how to create the selectionLines argument? (Or a better solution) [there is some extensions that uses editor.foldLevels, editor.foldAll and I can't find the docs for it]
The api: https://code.visualstudio.com/api/references/commands
Solved it!
you need to do:
vscode.commands.executeCommand('editor.fold', {selectionLines: [lineNumber]});