mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-23 01:08:59 +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,
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue