add rust-analyzer config

This commit is contained in:
Charlotte 🦝 Delenk 2024-11-14 08:09:46 +01:00
parent 26e14a99ed
commit 72ae0de74d
2 changed files with 18 additions and 0 deletions

View file

@ -8,6 +8,7 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
(rust-bin.selectLatestNightlyWith (toolchain: toolchain.default)) (rust-bin.selectLatestNightlyWith (toolchain: toolchain.default))
cargo-mommy cargo-mommy
clang
]; ];
home.shellAliases = { home.shellAliases = {
cargo = "${pkgs.cargo-mommy}/bin/cargo-mommy"; cargo = "${pkgs.cargo-mommy}/bin/cargo-mommy";

View file

@ -36,6 +36,23 @@
"nix.serverSettings" = { "nix.serverSettings" = {
nil.formatting.command = [ "${pkgs.nixfmt-rfc-style}/bin/nixfmt" ]; nil.formatting.command = [ "${pkgs.nixfmt-rfc-style}/bin/nixfmt" ];
}; };
"rust-analyzer.diagnostics.experimental.enable" = true;
"rust-analyzer.diagnostics.styleLints.enable" = true;
"rust-analyzer.hover.actions.references.enable" = true;
"rust-analyzer.imports.granularity.enforce" = true;
"rust-analyzer.inlayHints.bindingModeHints.enable" = true;
"rust-analyzer.inlayHints.closureCaptureHints.enable" = true;
"rust-analyzer.inlayHints.closureReturnTypeHints.enable" = "always";
"rust-analyzer.inlayHints.discriminantHints.enable" = "always";
"rust-analyzer.inlayHints.lifetimeElisionHints.enable" = "always";
"rust-analyzer.inlayHints.lifetimeElisionHints.useParameterNames" = true;
"rust-analyzer.inlayHints.rangeExclusiveHints.enable" = true;
"rust-analyzer.inlayHints.typeHints.hideClosureInitialization" = false;
"rust-analyzer.interpret.tests" = true;
"rust-analyzer.lens.references.adt.enable" = true;
"rust-analyzer.lens.references.enumVariant.enable" = true;
"rust-analyzer.lens.references.method.enable" = true;
"rust-analyzer.lens.references.trait.enable" = true;
"sops.binPath" = "${pkgs.sops}/bin/sops"; "sops.binPath" = "${pkgs.sops}/bin/sops";
"workbench.iconTheme" = "material-icon-theme"; "workbench.iconTheme" = "material-icon-theme";
}; };