-- load defaults i.e lua_lsp require("nvchad.configs.lspconfig").defaults() local lspconfig = require "lspconfig" -- cf. https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md local servers = { "html", "cssls", "phpactor", "gopls", "jsonls", "lua_ls", "nixd", "pylsp", "tailwindcss", "templ", "vuels", } local nvlsp = require "nvchad.configs.lspconfig" -- lsps with default config for _, lsp in ipairs(servers) do lspconfig[lsp].setup { on_attach = nvlsp.on_attach, on_init = nvlsp.on_init, capabilities = nvlsp.capabilities, } end -- configuring single server, example: typescript -- lspconfig.ts_ls.setup { -- on_attach = nvlsp.on_attach, -- on_init = nvlsp.on_init, -- capabilities = nvlsp.capabilities, -- }