Skip to content

Commit

Permalink
feat(lsp): ignore lsp servers where setting is set to false
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jan 19, 2023
1 parent 3362f0a commit 5d3e126
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/lazyvim/plugins/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ return {
formatting_options = nil,
timeout_ms = nil,
},
-- LSP Server Settings
---@type lspconfig.options
servers = {
jsonls = {},
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5d3e126

Please sign in to comment.