12345678910111213141516171819202122232425 |
- -- EXAMPLE
- local on_attach = require("nvchad.configs.lspconfig").on_attach
- local on_init = require("nvchad.configs.lspconfig").on_init
- local capabilities = require("nvchad.configs.lspconfig").capabilities
- local lspconfig = require "lspconfig"
- -- see installed servers by ":LspInfo"
- local servers = { "html", "cssls", "pyright", "lua_ls" }
- -- lsps with default config
- for _, lsp in ipairs(servers) do
- lspconfig[lsp].setup {
- on_attach = on_attach,
- on_init = on_init,
- capabilities = capabilities,
- }
- end
- -- typescript
- lspconfig.tsserver.setup {
- on_attach = on_attach,
- on_init = on_init,
- capabilities = capabilities,
- }
|