Description
Summary
When opening a Rust source file with a file path either one level outside of the project directory or anywhere inside the directory, these features work perfectly. However, using a path more than one layer outside of the project directory, either on the commandline or in the editor, the 'goto definition' and 'show documentation' features and likely others do not work. Most simply do nothing, but 'goto definition' returns the error 'No definition found.'.
Reproduction Steps
Assume the following directory layout:
/
└─home/
└─saphira/
└─src/
└─SaphiraKai/
└─libaether/ # cargo created project dir
└─src/
└─lib.rs
This works:
~/src/SaphiraKai$ hx libaether/src/lib.rs
I am fully able to use features such as <space>k
.
However, moving up a single directory layer breaks.
This does not work:
~/src$ hx SaphiraKai/libaether/src/lib.rs
Attempting to use <space>k
and other LSP features simply do nothing, or yield an error.
I've also tried various other directory structure layouts, including this:
/
└─home/
└─saphira/
└─rd/ # ramdisk
└─libaether/ # same directory copied
└─src/
└─lib.rs
This works:
~/rd$ hx libaether/src/lib.rs
This does not work:
~$ hx rd/libaether/src/lib.rs
Helix log
I managed to get the output from opening a broken session, attempting to use <space>k
, and then closing the session:
~/.cache/helix/helix.log
2022-07-05T01:24:31.912 helix_lsp::transport [ERROR] err <- "[ERROR rust_analyzer] failed to find any projects in [AbsPathBuf(\"/home/saphira\")]\n"
2022-07-05T01:24:31.913 helix_lsp::transport [ERROR] err <- "[ERROR rust_analyzer::lsp_utils] rust-analyzer failed to discover workspace\n"
2022-07-05T01:24:31.913 helix_term::application [WARN] unhandled window/showMessage: ShowMessageParams { typ: Error, message: "rust-analyzer failed to discover workspace" }
2022-07-05T01:24:37.087 helix_lsp::transport [ERROR] err: <- StreamClosed
2022-07-05T01:24:37.087 helix_lsp::transport [ERROR] err: <- StreamClosed
Platform
Linux
Terminal Emulator
st-instantos (the instantOS fork of suckless terminal)
Helix Version
helix 22.05