VS Code extension/Developer tools/Published

Workspace Folder Toggle

A checkbox view to include or exclude folders in a multi-root VS Code workspace, saved straight to the .code-workspace file.

Built with
  • TypeScript
  • VS Code Extension API
  • Tree view
  • JSONC
Runs as
Activity Bar view · Status bar item · Quick pick · Context menu
Status · v1.2.2
Published on the VS Code Marketplace and on Open VSX (for Cursor, Windsurf, VSCodium and other VS Code-based editors). MIT licensed.
Downloads · live
58 downloads (VS Code 1 · Open VSX 57)

§ 01

What it is

Big multi-root workspaces with many repos get slow and noisy. This extension keeps every folder listed in the workspace file and lets you switch on only the ones you need, with a checkbox per folder.

The problem

Turning workspace folders on and off meant hand-editing the .code-workspace file and losing the removed entries.

Runtime

  1. Tree viewCheckboxes and groups
  2. ToggleComment line with //
  3. .code-workspaceWritten on each click
  4. VS CodeReloads the folder list

§ 02

Screenshot

Workspace Folders view with Backend and Frontend groups of checkboxes, the Quick Toggle picker, the folder right-click menu and a 7/9 on status bar count
Grouped checkboxes, the Quick Toggle picker, the folder menu and the status bar count.

Real screenshots of the extension's own interface; some show sample content.

§ 03

How it works

  1. 01

    Open a saved .code-workspace file and click the Workspace Folders icon in the Activity Bar.

  2. 02

    Untick a folder and its line in the folders list is commented out with //; tick it and the // is removed. Nothing is deleted.

  3. 03

    VS Code sees the file change and updates the Explorer.

§ 04

Key features

  • Groups from blank-line blocks, named by a `// # Backend` comment, each with its own checkbox.
  • Locked folders: the workspace root, plus any in the lockedPaths setting.
  • Named profiles, such as "frontend only", applied in one click.
  • Quick Toggle picker with search, and a `3/10 on` count in the status bar.
  • Undo, Enable All / Disable All, Invert Selection, Enable Only This.
  • Pin folders and reorder them or move them between groups by drag and drop.

§ 05

What it reads and writes

The open .code-workspace file
The only file it edits, to comment folders in and out.

§ 06

Write-ups