mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-29 12:10:12 +02:00
feat(lsp): ignore lsp servers where setting is set to false
This commit is contained in:
parent
3362f0abc4
commit
5d3e126b63
1 changed files with 4 additions and 0 deletions
|
@ -28,6 +28,7 @@ return {
|
||||||
formatting_options = nil,
|
formatting_options = nil,
|
||||||
timeout_ms = nil,
|
timeout_ms = nil,
|
||||||
},
|
},
|
||||||
|
-- LSP Server Settings
|
||||||
---@type lspconfig.options
|
---@type lspconfig.options
|
||||||
servers = {
|
servers = {
|
||||||
jsonls = {},
|
jsonls = {},
|
||||||
|
@ -88,6 +89,9 @@ return {
|
||||||
require("mason-lspconfig").setup({ ensure_installed = vim.tbl_keys(servers) })
|
require("mason-lspconfig").setup({ ensure_installed = vim.tbl_keys(servers) })
|
||||||
require("mason-lspconfig").setup_handlers({
|
require("mason-lspconfig").setup_handlers({
|
||||||
function(server)
|
function(server)
|
||||||
|
if servers[server] == false then
|
||||||
|
return
|
||||||
|
end
|
||||||
local server_opts = servers[server] or {}
|
local server_opts = servers[server] or {}
|
||||||
server_opts.capabilities = capabilities
|
server_opts.capabilities = capabilities
|
||||||
if opts.setup[server] then
|
if opts.setup[server] then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue