diff --git a/.gitignore b/.gitignore index 5988a64916ad8..5fb884e7bf5c5 100644 --- a/.gitignore +++ b/.gitignore @@ -48,7 +48,7 @@ no_llvm_build /llvm/ /mingw-build/ /build -/build-rust-analyzer/ +/build-rust-analyzer /dist/ /unicode-downloads /target diff --git a/src/bootstrap/src/core/build_steps/setup.rs b/src/bootstrap/src/core/build_steps/setup.rs index 4b0080f1c80a4..a798dcf18026f 100644 --- a/src/bootstrap/src/core/build_steps/setup.rs +++ b/src/bootstrap/src/core/build_steps/setup.rs @@ -596,6 +596,7 @@ Select which editor you would like to set up [default: None]: "; "198c195ed0c070d15907b279b8b4ea96198ca71b939f5376454f3d636ab54da5", "1c43ead340b20792b91d02b08494ee68708e7e09f56b6766629b4b72079208f1", "eec09a09452682060afd23dd5d3536ccac5615b3cdbf427366446901215fb9f6", + "b6143911d3ad8fd73a767f06a263e6ba7f1720f361a28b6e97266db8e21c042b", ], EditorKind::Vim | EditorKind::VsCode => &[ "ea67e259dedf60d4429b6c349a564ffcd1563cf41c920a856d1f5b16b4701ac8", diff --git a/src/etc/rust_analyzer_helix.toml b/src/etc/rust_analyzer_helix.toml index e2de2a374cbed..b3ded63ef79d9 100644 --- a/src/etc/rust_analyzer_helix.toml +++ b/src/etc/rust_analyzer_helix.toml @@ -4,7 +4,7 @@ # # To build rustfmt and proc macro server for r-a run the following command: # ``` -# x b proc-macro-srv-cli rustfmt --stage 0 --build-dir build-rust-analyzer +# x b proc-macro-srv-cli rustfmt --build-dir build-rust-analyzer # ``` [language-server.rust-analyzer.config] @@ -18,7 +18,6 @@ linkedProjects = [ ] [language-server.rust-analyzer.config.check] -invocationLocation = "root" invocationStrategy = "once" overrideCommand = [ "python3", @@ -57,7 +56,7 @@ overrideCommand = [ "x.py", "check", "--json-output", + "--compile-time-deps", "--build-dir", "build-rust-analyzer", - "--compile-time-deps", ] diff --git a/src/tools/nix-dev-shell/shell.nix b/src/tools/nix-dev-shell/shell.nix index 6ca8a7c4652d3..19c5080da0658 100644 --- a/src/tools/nix-dev-shell/shell.nix +++ b/src/tools/nix-dev-shell/shell.nix @@ -16,10 +16,15 @@ pkgs.mkShell { pkgs.nix pkgs.glibc.out pkgs.glibc.static + pkgs.rust-analyzer x # Get the runtime deps of the x wrapper ] ++ lists.flatten (attrsets.attrValues env); + shellHook = '' + export PATH=$(pwd)/build/host/stage0/bin:$PATH + ''; + env = { # Avoid creating text files for ICEs. RUSTC_ICE = 0;