Reproduction steps
- Create (in my case rust) project with the name appearing somewhere higher in the path tree. e.g.
/home/to266/projects/funny/some/folder/workspace/funny. If workspace literally corresponds to rust workspace, and funny inside is a rust package withing the workspace.
- Start
hx inside funny the package
- Observe that LSP is not initialized. The logs show
2021-06-14T09:40:14.641 helix_lsp::transport [ERROR] err <- [ERROR rust_analyzer] failed to find any projects in [AbsPathBuf("/home/to266/projects/funny")]
2021-06-14T09:40:14.642 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"window/showMessage","params":{"type":1,"message":"rust-analyzer failed to discover workspace"}}
Environment
- Platform: Linux
- Helix version: 0.2.0
Since both are rust projects, perhaps we could just steal some of the code
nvim-lsp uses
cargo metadata --no-deps --format-version 1to dump data then search forworkspace_root. Wish it was more straightforward.I think the procedure should be: