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