Search code examples
visual-studio-codevscode-extensions

how to use vscode extension to hide timeline and outline in the side bar


The photo of timeline and outline is below. I want to hide them by vscode extension.

outline and timeline views


Solution

  • Those views all have a remove command, so in an extension you could do this:

    await vscode.commands.executeCommand('timeline.removeView');
    await vscode.commands.executeCommand('outline.removeView');
    

    That works in my testing.