From ff2c36b30559d6211764abe0bb4f34912ab89780 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Sat, 20 Jul 2024 11:35:11 -0700 Subject: [PATCH] Add env var for rust-analyzer --- rust-toolchain/flake.nix | 5 +++++ rust/flake.nix | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/rust-toolchain/flake.nix b/rust-toolchain/flake.nix index f8f1957..251a6e4 100644 --- a/rust-toolchain/flake.nix +++ b/rust-toolchain/flake.nix @@ -35,6 +35,11 @@ cargo-watch rust-analyzer ]; + + env = { + # Required by rust-analyzer + RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library"; + }; }; }); }; diff --git a/rust/flake.nix b/rust/flake.nix index a2e518e..fc9696d 100644 --- a/rust/flake.nix +++ b/rust/flake.nix @@ -46,6 +46,11 @@ cargo-watch rust-analyzer ]; + + env = { + # Required by rust-analyzer + RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library"; + }; }; }); };