return {
  "neovim/nvim-lspconfig",
  opts = {
    servers = {
      "lua_ls",
      "rust_analyzer",
      "bashls",
      "ts_ls",
      "clangd",
    }
  },
  config = function(_, opts)
    local servers = opts.servers

    local has_cmp, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
    local has_blink, blink = pcall(require, "blink")
    local capabilities = vim.tbl_deep_extend(
      "force",
      {},
      vim.lsp.protocol.make_client_capabilities(),
      has_cmp and cmp_nvim_lsp.default_capabilities() or {},
      has_blink and blink.get_lsp_capabilities() or {},
      opts.capabilities or {}
    )

    local function setup(server_name, server_opts)
      server_opts = vim.tbl_deep_extend(
        "force",
        { capabilities = vim.deepcopy(capabilities) },
        server_opts
      )

      if server_opts.enabled == false then
        return
      end

      require("lspconfig")[server_name].setup(server_opts)
    end

    for k, v in pairs(servers) do
      if type(k) == "number" then
        setup(v, { enabled = true })
      elseif type(k) == "string" then
        setup(k, v)
      end
    end
  end
}
