Improve the rust setup

This commit is contained in:
Bad 2022-03-21 20:21:19 +01:00
parent d33887ea31
commit 22de5757d2
2 changed files with 9 additions and 10 deletions

View file

@ -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/";
}

View file

@ -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;