reinstalled lspconfig

This commit is contained in:
Fábio André Damas 2025-03-31 11:19:48 +01:00
parent 921457f15e
commit a009ea2d76
22 changed files with 27 additions and 137 deletions

View file

@ -23,12 +23,6 @@ local format_on_save = function(client, bufnr)
end
end
local configs = {}
for _, v in ipairs(vim.api.nvim_get_runtime_file('lsp/*', true)) do
local name = vim.fn.fnamemodify(v, ':t:r')
configs[name] = true
end
vim.lsp.enable(vim.tbl_keys(configs))
vim.api.nvim_create_autocmd('LspAttach', {
callback = function(args)
@ -57,6 +51,17 @@ vim.diagnostic.config({
})
return {
{
"neovim/nvim-lspconfig",
config = function()
local lspconfig = require('lspconfig')
for _, v in ipairs(vim.api.nvim_get_runtime_file('lua/lsp/*', true)) do
local name = vim.fn.fnamemodify(v, ':t:r')
local cfg = require("lsp/" .. name)
lspconfig[name].setup(cfg)
end
end
},
{
"williamboman/mason.nvim",