Skip to content

Prevent mason-lspconfig from starting up a conflicting rust_analyzer LSP client #94

Answered by mrcjkb
OMGeeky asked this question in Q&A
Discussion options

You must be logged in to vote

Hey 👋

I'm not familiar with the internals of LazyVim, and I can't see anything wrong in your config.

The health check searches for rust filetype autocommands created by lspconfig and reports the error if it finds one.

You could try opening a rust file and running :LspInfo. It should tell you if more than one client is attached.
If that's the case, then you can try explicitly disabling the rust_analyzer configuration in lspconfig with the following LazyVim snippet:

  {
    "neovim/nvim-lspconfig",
    opts = {
      setup = {
        rust_analyzer = function()
          return true 
        end,
      },
    },
  }

Or, more generally (for anyone not using LazyVim):

require("mason-lspconfig").

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@utensil
Comment options

@mrcjkb
Comment options

@utensil
Comment options

@mrcjkb
Comment options

@utensil
Comment options

Answer selected by OMGeeky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants