Every time I try to open external docs on WSL, if the locally built docs are available, nothing happens. It's been like this for quite a while.
rust-analyzer version: rust-analyzer version: 0.3.2997-standalone [/home/m/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.2997-linux-x64/server/rust-analyzer]
rustc version: rustc 1.97.1 (8bab26f4f 2026-07-14)
editor or extension: VSCode
code snippet to reproduce: Open a WSL project and try to open external docs for something from the standard library and for something else
/// A struct
struct Foo;
fn main() -> anyhow::Result<()> {
let _a: i32 = 0;
let _foo = Foo;
Ok(())
}
LSP logs for i32:
(Please notice that the web link is for nightly, not stable)
Received response 'experimental/externalDocs - (466)' in 0ms.
Result: {
"web": "https://doc.rust-lang.org/nightly/core/primitive.i32.html",
"local": "file:///home/m/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/core/primitive.i32.html"
}
LSP logs for Foo:
Received response 'experimental/externalDocs - (468)' in 0ms.
Result: {
"web": "https://docs.rs/stuff/0.1.0/stuff/struct.Foo.html",
"local": "file:///home/m/source/other/stuff/target/doc/stuff/struct.Foo.html"
}
LSP logs for anyhow::Result:
Received response 'experimental/externalDocs - (470)' in 1ms.
Result: {
"web": "https://docs.rs/anyhow/1.0.104/anyhow/type.Result.html",
"local": "file:///home/m/source/other/stuff/target/doc/anyhow/type.Result.html"
}
The docs for i32 don't open at all. The docs for anyhow::Result and Foo open in my default browser, but after running cargo doc it tries to open the "local" version, and nothing happens. Links like file://///wsl.localhost/Debian/home/m/source/stuff/target/doc/stuff/struct.Foo.html or file://///wsl.localhost/Debian/home/m/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/core/primitive.i32.html do open in my browser as they should.
Every time I try to open external docs on WSL, if the locally built docs are available, nothing happens. It's been like this for quite a while.
rust-analyzer version: rust-analyzer version: 0.3.2997-standalone [/home/m/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.2997-linux-x64/server/rust-analyzer]
rustc version: rustc 1.97.1 (8bab26f4f 2026-07-14)
editor or extension: VSCode
code snippet to reproduce: Open a WSL project and try to open external docs for something from the standard library and for something else
LSP logs for
i32:(Please notice that the web link is for nightly, not stable)
LSP logs for
Foo:LSP logs for
anyhow::Result:The docs for
i32don't open at all. The docs foranyhow::ResultandFooopen in my default browser, but after runningcargo docit tries to open the "local" version, and nothing happens. Links likefile://///wsl.localhost/Debian/home/m/source/stuff/target/doc/stuff/struct.Foo.htmlorfile://///wsl.localhost/Debian/home/m/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/core/primitive.i32.htmldo open in my browser as they should.