williamboman / mason-lspconfig.nvim

Extension to mason.nvim that makes it easier to use lspconfig with mason.nvim.
Apache License 2.0
2.73k stars 167 forks source link

Don't set up lspconfig clients if conflicting plugins are installed #353

Open mrcjkb opened 8 months ago

mrcjkb commented 8 months ago

Is your feature request related to a problem? Please describe.

Hey 👋

I sometimes have users opening issues/discussions because mason-lspconfig sets up lspconfig configurations that conflict with my plugins (haskell-tools.nvim, rustaceanvim), when they use mason to install a language server.

Often (usually when using a distro), they aren't aware that mason-lspconfig is installed.

Describe the solution you'd like

Would it be feasible for mason-lspconfig.nvim to check for the presence of certain plugins (e.g. by searching the runtimepath or with a pcall('require', ...)), and basing the default behaviour on the presence of those plugins?

Describe potential alternatives you've considered

N/A

Additional context

Example: https://github.com/mrcjkb/rustaceanvim/discussions/94

mrcjkb commented 6 months ago

After looking at the codebase, it looks to me like mason-lspconfig doesn't actually call the lspconfig configurations' setup functions automatically (@williamboman can you confirm this?).

I believe it's distros like LazyVim and AstroNVim that are adding this behaviour.