2024-09-15 07:01:57 +05:30
|
|
|
-- load defaults i.e lua_lsp
|
|
|
|
require("nvchad.configs.lspconfig").defaults()
|
|
|
|
|
|
|
|
local lspconfig = require "lspconfig"
|
|
|
|
|
|
|
|
-- EXAMPLE
|
2024-09-17 08:16:12 +05:30
|
|
|
local servers = { "html", "cssls", "nil_ls", "marksman", "clangd", "pylsp", "ts_ls", "java_language_server", "dockerls", "docker_compose_language_service", "jsonls", "kotlin_language_server", "bashls", "yamlls", "sqls" }
|
2024-09-15 07:01:57 +05:30
|
|
|
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
|
2024-09-17 08:16:12 +05:30
|
|
|
lspconfig.gdscript.setup {
|
|
|
|
cmd = { "ncat", "localhost", "6005"}
|
|
|
|
}
|
2024-09-15 07:01:57 +05:30
|
|
|
|
|
|
|
-- configuring single server, example: typescript
|
|
|
|
-- lspconfig.ts_ls.setup {
|
|
|
|
-- on_attach = nvlsp.on_attach,
|
|
|
|
-- on_init = nvlsp.on_init,
|
|
|
|
-- capabilities = nvlsp.capabilities,
|
|
|
|
-- }
|