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, ... }: { pkgs, ... }:
let
fenix = pkgs.fenix;
in
{ {
environment.systemPackages = [ environment.systemPackages = with pkgs; [
fenix.latest.toolchain fenix.latest.toolchain
#fenix.rust-analyzer rust-analyzer
pkgs.rust-analyzer cargo-edit
pkgs.cargo-edit cargo-crev
pkgs.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" "typescript"
]; ];
"prettier.useTabs" = true; "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.cargo.loadOutDirsFromCheck" = true;
"rust-analyzer.procMacro.enable" = true; "rust-analyzer.procMacro.enable" = true;
"clangd.checkUpdates" = false; "clangd.checkUpdates" = false;