From 3fd95643b0f7a4c95e07d444aa0728f0951b3931 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Sun, 5 Nov 2023 08:12:07 -0500 Subject: [PATCH] fix: cargo clippy for rust --- modules/common/neovim/config/lsp.nix | 8 ++++++-- modules/common/programming/rust.nix | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/common/neovim/config/lsp.nix b/modules/common/neovim/config/lsp.nix index a716083..e173285 100644 --- a/modules/common/neovim/config/lsp.nix +++ b/modules/common/neovim/config/lsp.nix @@ -43,8 +43,12 @@ cmd = [ "${pkgs.terraform-ls}/bin/terraform-ls" "serve" ]; }; - use.lspconfig.rust_analyzer.setup = - dsl.callWith { cmd = [ "${pkgs.rust-analyzer}/bin/rust-analyzer" ]; }; + use.lspconfig.rust_analyzer.setup = dsl.callWith { + cmd = [ "${pkgs.rust-analyzer}/bin/rust-analyzer" ]; + settings = { + "['rust-analyzer']" = { check = { command = "clippy"; }; }; + }; + }; vim.api.nvim_create_augroup = dsl.callWith [ "LspFormatting" { } ]; diff --git a/modules/common/programming/rust.nix b/modules/common/programming/rust.nix index 71ca9eb..30eb403 100644 --- a/modules/common/programming/rust.nix +++ b/modules/common/programming/rust.nix @@ -6,9 +6,9 @@ home-manager.users.${config.user} = { - home.packages = with pkgs; [ cargo rustc gcc ]; + programs.fish.shellAbbrs = { ca = "cargo"; }; - programs.fish.shellAbbrs = { }; + home.packages = with pkgs; [ cargo rustc clippy gcc ]; };