From 22de5757d29c96d62ac9f72dfcc13949b8a9eddf Mon Sep 17 00:00:00 2001 From: Bad Date: Mon, 21 Mar 2022 20:21:19 +0100 Subject: [PATCH] Improve the rust setup --- profiles/rust/default.nix | 15 ++++++--------- users/profiles/neovim/default.nix | 4 +++- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/profiles/rust/default.nix b/profiles/rust/default.nix index b6c3d00..683f4ec 100644 --- a/profiles/rust/default.nix +++ b/profiles/rust/default.nix @@ -1,14 +1,11 @@ { pkgs, ... }: -let - fenix = pkgs.fenix; -in { - environment.systemPackages = [ + environment.systemPackages = with pkgs; [ fenix.latest.toolchain - #fenix.rust-analyzer - pkgs.rust-analyzer - pkgs.cargo-edit - pkgs.cargo-crev + rust-analyzer + cargo-edit + cargo-crev + cargo-watch ]; - environment.variables.RUST_SRC_PATH = "${fenix.latest.rust-src}/lib/rustlib/src/rust/library/"; + environment.variables.RUST_SRC_PATH = "${pkgs.fenix.latest.rust-src}/lib/rustlib/src/rust/library/"; } diff --git a/users/profiles/neovim/default.nix b/users/profiles/neovim/default.nix index 8ec1f06..b45b6ed 100644 --- a/users/profiles/neovim/default.nix +++ b/users/profiles/neovim/default.nix @@ -158,7 +158,9 @@ "typescript" ]; "prettier.useTabs" = true; - "rust-analyzer.server.path" = "${pkgs.rust-analyzer}"; + "rust-analyzer.server.path" = "${pkgs.fenix.rust-analyzer}"; + "rust-analyzer.updates.prompt" = false; + "rust-analyzer.updates.checkOnStartup" = false; "rust-analyzer.cargo.loadOutDirsFromCheck" = true; "rust-analyzer.procMacro.enable" = true; "clangd.checkUpdates" = false;