From a1156d6a4284dfc86e315450969c135a298ad121 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis Date: Sun, 17 Mar 2024 13:22:30 +0200 Subject: [PATCH] fix(lang/rust): Remove `rust-analyzer` from `nvim-lspconfig` According to the maintainer of `rustaceanvim` (see his comment [here](https://github.com/LazyVim/LazyVim/pull/2198#issuecomment-1999475044)) he says > To pick up on this: There's a good reason rustaceanvim doesn't automatically pick up a mason.nvim installation. It will most likely be built with a different toolchain than the one your project uses, often leading to discrepancies and subtle bugs. It's easy to configure rustaceanvim to use mason.nvim if you really want it, but I generally adhere to the YAGNI principle. I tried locally and the removal of `rust-analyzer` from `nvim-lspconfig` doesn't seem to have any effect on how `rustaceanvim` behaves. I propose to remove all instances of `rust-analyzer` from `nvim-lspconfig` to avoid any possible issues from users that don't have `rust-analyzer` installed in their toolchain (in this case it would pick up Mason's $PATH I believe), since they will think that since `rust-analyzer` is installed by Mason, there shouldn't be a problem and report issues as bugs. --- lua/lazyvim/plugins/extras/lang/rust.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index 397b6fc2..cb84a19e 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -90,7 +90,6 @@ return { "neovim/nvim-lspconfig", opts = { servers = { - rust_analyzer = {}, taplo = { keys = { { @@ -107,11 +106,6 @@ return { }, }, }, - setup = { - rust_analyzer = function() - return true - end, - }, }, },