Bundle rust-analyzer in dev environment

The user's rust-analyzer may be of the wrong version.
This commit is contained in:
Zhaofeng Li 2022-01-08 01:20:36 -08:00
parent f92236da46
commit 2aeab62880
2 changed files with 5 additions and 1 deletions

View File

@ -52,7 +52,7 @@
devShell = pkgs.mkShell {
inputsFrom = [ defaultPackage ];
packages = with pkgs; [ clippy mdbook python3 ];
packages = with pkgs; [ clippy mdbook python3 rust-analyzer ];
shellHook = ''
export NIX_PATH=nixpkgs=${pkgs.path}
'';

4
nix/rust-analyzer.sh Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash ../shell.nix
exec rust-analyzer "$@"