return {
    "neovim/nvim-lspconfig",

    event = { "BufReadPre", "BufNewFile" },

    dependencies = {
        "j-hui/fidget.nvim",
        "hrsh7th/cmp-nvim-lsp",
        "williamboman/mason.nvim",
        "williamboman/mason-lspconfig.nvim",
        "WhoIsSethDaniel/mason-tool-installer.nvim",
    },

    config = function()
        require("fidget").setup({})

        local mason = require("mason")
        local mason_lspconfig = require("mason-lspconfig")
        local mason_tool_installer = require("mason-tool-installer")

        local cmp_lsp = require("cmp_nvim_lsp")

        local capabilities = vim.tbl_deep_extend(
            "force",
            {},
            vim.lsp.protocol.make_client_capabilities(),
            cmp_lsp.default_capabilities())

        mason.setup({
            ui = {
                icons = {
                    package_installed = "✓",
                    package_pending = "➜",
                    package_uninstalled = "✗",
                },
            },
        })

        mason_lspconfig.setup({
            ensure_installed = {
                "tsserver",
                "html",
                "cssls",
                "clangd",
                "tailwindcss",
                "prismals",
                "pyright",
            },
            automatic_installation = true,

            handlers = {
                function(server_name)
                    require("lspconfig")[server_name].setup {
                        capabilities = capabilities,
                    }
                end,

                ["lua_ls"] = function()
                    local lspconfig = require("lspconfig")

                    lspconfig.lua_ls.setup({
                        capabilities = capabilities,
                        settings = {
                            Lua = {
                                diagnostics = {
                                    globals = {"vim"},
                                },
                            },
                        },
                    })
                end,

                ["tsserver"] = function()
                    local lspconfig = require("lspconfig")

                    lspconfig.tsserver.setup({
                        capabilities = capabilities,
                        on_attach = function(client)
                            client.resolved_capabilities.document_formatting = true
                        end,
                    })
                end,
            },
        })

        mason_tool_installer.setup({
            ensure_installed = {
                "prettier",
                "prettierd",
                "stylua",
                "pylint",
                "eslint_d",
                "htmlbeautifier",
            },
        })
    end,

    opts = {
        servers = {
            tailwindcss = {},
        },
    },
}
