From 41186b8c17b8eb066952c7dccd4d343ef44dc311 Mon Sep 17 00:00:00 2001 From: Harivansh Rathi Date: Wed, 25 Mar 2026 12:44:52 -0400 Subject: [PATCH] rust --- config/nvim/lua/lsp/rust_analyzer.lua | 3 ++- home/nvim.nix | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/nvim/lua/lsp/rust_analyzer.lua b/config/nvim/lua/lsp/rust_analyzer.lua index bc86149..244e450 100644 --- a/config/nvim/lua/lsp/rust_analyzer.lua +++ b/config/nvim/lua/lsp/rust_analyzer.lua @@ -1,7 +1,8 @@ return { settings = { ['rust-analyzer'] = { - checkOnSave = { command = 'clippy' }, + checkOnSave = true, + check = { command = 'clippy' }, cargo = { allFeatures = true }, procMacro = { enable = true }, diagnostics = { enable = true }, diff --git a/home/nvim.nix b/home/nvim.nix index 08e2ad3..e7bc2bc 100644 --- a/home/nvim.nix +++ b/home/nvim.nix @@ -16,6 +16,10 @@ exec ${pkgs.python3}/bin/python3 "$@" ''; in { + # Keep rust-analyzer in the user profile so it shadows rustup's proxy in + # /run/current-system/sw/bin when Neovim resolves LSP executables. + home.packages = [pkgs.rust-analyzer]; + programs.neovim = { enable = true; viAlias = true; @@ -38,7 +42,6 @@ in { python python3 ripgrep - rust-analyzer stylua vscode-langservers-extracted nodePackages.bash-language-server