feat(lsp): ignore lsp servers where setting is set to false

This commit is contained in:
Folke Lemaitre
2023-01-19 22:10:38 +01:00
parent 3362f0abc4
commit 5d3e126b63

View File

@ -28,6 +28,7 @@ return {
formatting_options = nil,
timeout_ms = nil,
},
-- LSP Server Settings
---@type lspconfig.options
servers = {
jsonls = {},
@ -88,6 +89,9 @@ return {
require("mason-lspconfig").setup({ ensure_installed = vim.tbl_keys(servers) })
require("mason-lspconfig").setup_handlers({
function(server)
if servers[server] == false then
return
end
local server_opts = servers[server] or {}
server_opts.capabilities = capabilities
if opts.setup[server] then