The Deska blog

Multi-Root Workspaces in VS Code

Learn how to use multi-root workspaces in VS Code to manage multiple projects efficiently and explore how spatial tools like Deska offer a different approach.

· 10 min read

Managing multiple repositories or disparate project folders within a single window is a common requirement for modern software development. Multi-root workspaces in VS Code provide a native way to group several distinct folders into one logical unit, allowing developers to search across all files and run tasks globally without switching between multiple application windows. This feature is particularly useful when working on microservices, monorepos, or front-end and back-end projects that live in separate directories but belong to the same workflow.

Understanding the Multi-Root Architecture

VS Code operates by default in a single folder mode. When you open a folder, it becomes the root of your explorer. Multi-root workspaces break this limitation by introducing a .code-workspace file. This JSON file acts as a manifest that tells the editor which absolute or relative paths to include in the sidebar.

When you transition to a multi-root setup, the UI changes slightly to show the workspace name at the top level. Extensions also adapt to this mode. Many extensions can be configured to behave differently for each root folder, which is essential if you have a Python backend and a TypeScript frontend in the same workspace. Each folder can have its own .vscode settings folder, providing granular control over linting, debugging, and formatting rules.

Setting Up Your First Workspace

Creating a multi-root environment is straightforward. You can start by opening a single folder and then selecting the option to add another folder to the workspace from the file menu. Once you have multiple folders, you should save the workspace configuration.

  1. Open VS Code and your primary project folder.
  2. Go to File, then Add Folder to Workspace.
  3. Select the second project directory.
  4. Go to File, then Save Workspace As.
  5. Name your .code-workspace file and save it in a convenient location.

This file can be committed to version control, allowing team members to share the same organizational structure. It is important to note that the paths in this file can be relative, which makes the workspace portable across different machines as long as the directory structure remains consistent.

Features and Limitations of VS Code Workspaces

The primary benefit of this approach is the unified search functionality. You can press Cmd+Shift+F or Ctrl+Shift+F to search through every file in all included roots simultaneously. This is a massive productivity boost when you are refactoring shared interfaces or looking for specific environment variable usages across different services.

However, the interface remains bound to a traditional sidebar and tabbed editor. As you add more folders, the sidebar can become cluttered and hard to navigate. While you can collapse folders, you are still restricted by the vertical list view. This is where different philosophies in workspace management emerge. Some developers prefer the strict list of VS Code, while others find that a spatial representation helps them maintain mental context more effectively.

An Alternative Approach with Deska

Tools like Deska take a different path by providing an infinite canvas workspace. Instead of a list of folders in a sidebar, you place panels anywhere on a large 2D plane. This allows you to visually group different parts of your project. For example, you could have your API code in one area and your frontend code in another, with terminals and browser previews positioned exactly where they make the most sense for your current task.

In Deska, the concept of a workspace is less about a configuration file and more about the spatial arrangement of your tools. You can zoom out to see the entire project architecture or zoom in on a specific panel to focus. Because Deska is local-first, your files and session data remain on your machine, just like in a traditional editor. You can learn more about how these panels function in the docs/panels section.

Comparing Integrated and Spatial Environments

Both VS Code and Deska offer unique advantages for managing complex projects. The right choice depends on how you process information and how many tools you need to see at once.

FeatureVS Code Multi-RootDeska Canvas
File NavigationVertical SidebarSpatial Panels
Context SwitchingTab BasedZoom and Pan
Project Grouping.code-workspace fileInfinite Canvas
Integrated ToolsIntegrated TerminalMultiple Terminals

VS Code excels at deep code editing and has a vast ecosystem of extensions. It is the industry standard for a reason. Deska, on the other hand, is built to house not just code but your entire workflow. You can run terminals alongside a browser and your notes. This spatial organization can reduce the cognitive load of remembering which tab corresponds to which project.

Advanced Workspace Configuration

Within a VS Code multi-root setup, you can customize settings at three levels: User, Workspace, and Folder. Folder settings override Workspace settings, and Workspace settings override User settings. This hierarchy is powerful. For example, you might want to hide the node_modules folder in one specific project root but keep it visible in another for debugging purposes.

To edit these settings, you open the .code-workspace file. The settings object inside this file applies to the entire workspace. For example:

{
  "folders": [
    { "path": "backend" },
    { "path": "frontend" }
  ],
  "settings": {
    "editor.formatOnSave": true
  }
}

This ensures that every project within this workspace follows the same formatting rules, regardless of the individual developer's global editor settings.

Integrating AI Agents in Your Workflow

Modern workspaces are increasingly incorporating AI to assist with repetitive tasks. In VS Code, this usually happens through extensions that live in a side panel. In Deska, AI integration is more central to the spatial experience. Deska allows you to run coding agents like Claude Code and OpenCode side by side as individual panels.

Instead of a single chat window, you can have multiple agent threads active at once. One agent could be analyzing your logs in a terminal while another suggests changes in a Monaco code editor panel. You can even use Ask Deska, a voice and chat assistant, to drive the workspace by opening new panels or running commands. This level of orchestration is a significant departure from the traditional editor experience.

Collaborative and Mobile Workflows

A common challenge with complex workspaces is maintaining productivity when away from the main workstation. VS Code offers some remote development options via extensions. Deska provides a dedicated mobile app that allows you to monitor and continue your work through a secure relay. Because the devices pair directly without exposing ports, it maintains the security of a local-first environment.

Whether you choose the structured list approach of VS Code or the infinite canvas of Deska, the goal remains the same: reducing friction between your ideas and the code. For those who find themselves overwhelmed by too many tabs and windows, exploring a spatial canvas might provide the clarity needed for complex multi-project development.

Frequently Asked Questions

How to open multiple projects in VS Code?

You can use the Multi-root workspaces feature by selecting Add Folder to Workspace from the File menu. This allows you to view and edit multiple directories within a single sidebar and search across all of them at once.

Can I have different settings for each folder in VS Code?

Yes, each folder in a multi-root workspace can contain its own .vscode/settings.json file. These settings will take precedence over the workspace level and user level settings for that specific directory.

What is the best way to manage a monorepo?

Managing a monorepo can be done via VS Code multi-root workspaces for a file-centric view, or by using Deska to create a spatial layout where different modules, documentation, and services are placed as distinct panels on an infinite canvas.

Get Started with Deska

If you are looking for a new way to organize your projects beyond traditional tabs and sidebars, you can download Deska for Mac, Windows, or Linux. The workspace is free to use and provides a flexible environment for your code, terminals, and AI agents.

💡 Ideas+🐛 BugsSuggest a feature or report a bug