Skip to content

Multi-root workspace only initializes first folder #58

@mtarnovan

Description

@mtarnovan

First, thanks for this project, it's a great idea!

Description

In a multi-root VS Code/Cursor workspace, Dexter only initializes/indexes the first workspace folder. Files in additional folders are not treated as part of the active project root.

To reproduce

  1. Create a workspace file like:
    {
      "folders": [
        { "path": "folder_a" },
        { "path": "folder_b" }
      ]
    }
  2. Open that workspace in Cursor/VS Code.
  3. Install/enable Dexter extension.
  4. Open Elixir files from both folders.
  5. Check Output → Dexter logs.

Actual behavior

Dexter initializes with only the first folder as root, e.g.:

  • Dexter LSP v0.5.3 starting (root: /Users/.../folder_a)
  • Initialize: projectRoot=/Users/.../folder_a debug=false
    folder_b is not included as a root in this multi-folder workspace.

Expected behavior

Both workspace folders should be supported in multi-root mode, either by:

  • running one LanguageClient per folder, or
  • passing/handling all workspace folders correctly if single-server multi-root is intended.

Relevant code pointers

Docs context

The README section on .dexter.db root discovery appears to describe sub-app root recovery (e.g. Neovim rootUri in a monorepo), not true VS Code multi-root workspace support:
https://github.com/remoteoss/dexter/blob/main/README.md#index-database-location-dexterdb

Environment

  • Dexter: 0.5.3
  • Dexter VS Code extension: 0.2.1
  • Editor: Cursor (likely reproducible in VS Code)
  • OS: macOS

Workaround

Atm as a workaround I ran dexter init in the parent folder, which works but that has some unintended side effects, such as watchGitHead not working (since that expects a .git at the chosen root folder) + indexing stuff I don't need (all other sibling folders of folder_a and folder_b)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions