Closed
Description
rust-analyzer version: 2023-08-21
(built on nightly from that date, using oxalica/rust-overlay
on NixOS)
rustc version: 1.72.0 (5680fa18f 2023-08-23)
relevant settings: None set.
RA shows the following when I hover the status bar label:
Failed to spawn one or more proc-macro servers.
- cannot find proc-macro-srv, the workspace `/home/jacob/Documents/linux-desktop/hyprland-workspace-profiles` is missing a sysroot
Failed to find sysroot for Cargo.toml file /home/jacob/Documents/linux-desktop/hyprland-workspace-profiles/Cargo.toml. Is rust-src installed? can't load standard library from sysroot
/nix/store/82a1211nk3afkhkwxx8bi289ql4mcdv0-rust-minimal-1.72.0
(discovered via `rustc --print sysroot`)
try installing the Rust source the same way you installed rustc
If there are any Nix people who are here, this is the DevShell I use:
devShells = eachSystem (system:
let pkgs = pkgsFor.${system};
in {
default = pkgs.mkShell {
strictDeps = true;
packages = with pkgs; [
(lib.hiPrio (rust-bin.stable.latest.minimal.override {
extensions = [ "rust-docs" "clippy" ];
}))
(rust-bin.selectLatestNightlyWith (toolchain:
toolchain.minimal.override {
extensions = [ "rustfmt" "rust-analyzer" ];
}))
pkg-config
openssl
];
};
});