How to exclude lsp from mason-lspconfig's auto configuration? #1567
-
Hi, I'm using The plugin manager I'm using is Here is the part of how I do it in my config: local function config_mason_lsp()
local lsp_zero = require('lsp-zero')
require('mason').setup({})
require('mason-lspconfig').setup({
ensure_installed = { 'lua_ls' },
handlers = {
lsp_zero.default_setup,
rust_analyzer =lsp_zero.noop,
},
})
end
local function lsp_config()
local lsp_zero = require('lsp-zero')
local lsp_zero_preset = lsp_zero.preset({
manage_nvim_cmp = {
set_extra_mappings = true
}
})
lsp_zero_preset.setup()
require("plugins.autocompletion").config()
config_lsp_keybinding()
end
return {
PLUGIN_PROXY .. "VonHeikemen/lsp-zero.nvim",
branch = 'v2.x',
dependencies = {
-- LSP Support
{ 'neovim/nvim-lspconfig' }, -- Required
{ -- Optional
'williamboman/mason.nvim',
build = function()
pcall(vim.api.nvim_command, 'MasonUpdate')
end,
},
{ 'williamboman/mason-lspconfig.nvim', config = config_mason_lsp}, -- Optional
-- Autocompletion
{ 'hrsh7th/nvim-cmp' }, -- Required
{ 'hrsh7th/cmp-nvim-lsp' }, -- Required
{ 'L3MON4D3/LuaSnip' }, -- Required
{ "folke/neodev.nvim", config = config_neodev }
},
config = lsp_config
}
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
An possible approach can be found in this disscusion. |
Beta Was this translation helpful? Give feedback.
An possible approach can be found in this disscusion.
That doesn't work for me, though, I think it may have something to do with lsp-zero( I guess 😕 )
In the end I just install
rust-analyzer
withrustup
in order to cooperate with rustaceanvim