neovim-config/lua/configs/lspconfig.lua

24 lines
599 B
Lua
Raw Normal View History

2024-03-18 01:04:01 +00:00
-- 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"
2024-04-03 22:07:52 +00:00
local servers = { "html", "cssls", "cmake", "clangd" }
2024-03-18 01:04:01 +00:00
-- 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,
}