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
- Create a workspace file like:
{
"folders": [
{ "path": "folder_a" },
{ "path": "folder_b" }
]
}
- Open that workspace in Cursor/VS Code.
- Install/enable Dexter extension.
- Open Elixir files from both folders.
- 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)
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
{ "folders": [ { "path": "folder_a" }, { "path": "folder_b" } ] }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=falsefolder_bis not included as a root in this multi-folder workspace.Expected behavior
Both workspace folders should be supported in multi-root mode, either by:
LanguageClientper folder, orRelevant code pointers
https://github.com/remoteoss/dexter-vscode/blob/main/src/extension.ts#L8-L46
WorkspaceFolders[0]/RootURI):https://github.com/remoteoss/dexter/blob/main/internal/lsp/server.go#L275-L287
https://github.com/remoteoss/dexter/blob/main/internal/lsp/server.go#L2006-L2008
projectRoot-scoped:workspaceFolderis unset (workspaceFolders: null,rootPathfrom first folder):https://github.com/microsoft/vscode-languageserver-node/blob/release/client/9.0.1/client/src/common/client.ts#L1213-L1228
Docs context
The README section on
.dexter.dbroot discovery appears to describe sub-app root recovery (e.g. NeovimrootUriin a monorepo), not true VS Code multi-root workspace support:https://github.com/remoteoss/dexter/blob/main/README.md#index-database-location-dexterdb
Environment
0.5.30.2.1Workaround
Atm as a workaround I ran
dexter initin the parent folder, which works but that has some unintended side effects, such aswatchGitHeadnot working (since that expects a.gitat the chosen root folder) + indexing stuff I don't need (all other sibling folders offolder_aandfolder_b)