nvim-config/lua/configs/lspconfig.lua

27 lines
673 B
Lua
Raw Normal View History

2024-04-16 09:49:51 +00:00
local configs = require "nvchad.configs.lspconfig"
2024-04-08 09:26:41 +00:00
local on_attach = configs.on_attach
local on_init = configs.on_init
local capabilities = configs.capabilities
2023-08-24 11:54:45 +00:00
local lspconfig = require "lspconfig"
-- if you just want default config for the servers then put them in a table
2024-10-30 08:32:27 +00:00
local servers = { "html", "cssls", "ts_ls", "yamlls", "ansiblels", "bashls", "rls", "gopls", "terraformls" }
2023-08-24 11:54:45 +00:00
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = on_attach,
2024-04-16 09:49:51 +00:00
on_init = on_init,
capabilities = capabilities,
2023-08-24 11:54:45 +00:00
}
end
2024-04-17 09:13:05 +00:00
2024-04-17 13:37:16 +00:00
require("cmp").setup {
sources = {
{ name = "path" },
{ name = "nvim_lsp" },
2024-05-05 16:47:30 +00:00
{ name = "rg", keyword_length = 4 },
2024-04-17 13:37:16 +00:00
},
}