From b767bad490030af404d46e20cab6a91db9292dd4 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Tue, 6 Apr 2021 23:42:32 -0400 Subject: [PATCH] Explicitly specify extensions to include rust-analysis And change VSCode extension --- .vscode/extensions.json | 5 +++++ flake.nix | 21 ++++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..4a2528f --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "matklad.rust-analyzer" + ] +} \ No newline at end of file diff --git a/flake.nix b/flake.nix index 906bfc8..b63c4d0 100644 --- a/flake.nix +++ b/flake.nix @@ -12,15 +12,26 @@ }; outputs = { self, nixpkgs, flake-utils, rust-overlay, flake-compat }: - flake-utils.lib.eachDefaultSystem - (system: + flake-utils.lib.eachDefaultSystem + (system: let pkgs = import nixpkgs { inherit system; - overlays = [rust-overlay.overlay ]; - }; in { + overlays = [ rust-overlay.overlay ]; + }; in + { devShell = pkgs.mkShell { nativeBuildInputs = [ - pkgs.rust-bin.stable.latest.default + (pkgs.rust-bin.stable.latest.default.override { + extensions = [ + "rust-src" + "cargo" + "rustc" + "rls" + "rust-analysis" + "rustfmt" + "clippy" + ]; + }) ]; }; }