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

1
lua/lsp/eslint.lua Normal file
View file

@ -0,0 +1 @@
return {}

1
lua/lsp/gopls.lua Normal file
View file

@ -0,0 +1 @@
return {}

8
lua/lsp/jsonls.lua Normal file
View file

@ -0,0 +1,8 @@
return {
settings = {
json = {
schemas = require('schemastore').json.schemas(),
validate = { enable = true },
},
},
}

1
lua/lsp/lemminx.lua Normal file
View file

@ -0,0 +1 @@
return {}

15
lua/lsp/lua_ls.lua Normal file
View file

@ -0,0 +1,15 @@
return {
settings = {
Lua = {
runtime = {
version = 'LuaJIT',
},
diagnostics = {
globals = { 'vim' },
},
telemetry = {
enable = false,
},
},
},
}

1
lua/lsp/pyright.lua Normal file
View file

@ -0,0 +1 @@
return {}

1
lua/lsp/ruff.lua Normal file
View file

@ -0,0 +1 @@
return {}

View file

@ -0,0 +1 @@
return {}

23
lua/lsp/tailwindcss.lua Normal file
View file

@ -0,0 +1,23 @@
return {
settings = {
tailwindCSS = {
classAttributes = { "class", "className", "classList", "class:list", "ngClass", "pathClassName" },
experimental = {
classRegex = {
{
"(?:clsx|cva|cx)\\(([^)(]*(?:\\([^)(]*(?:\\([^)(]*(?:\\([^)(]*\\)[^)(]*)*\\)[^)(]*)*\\)[^)(]*)*)\\)",
"'([^']*)'",
},
{
"(?:clsx|cva|cx)\\(([^)(]*(?:\\([^)(]*(?:\\([^)(]*(?:\\([^)(]*\\)[^)(]*)*\\)[^)(]*)*\\)[^)(]*)*)\\)",
'"([^"]*)"',
},
{
"(?:clsx|cva|cx)\\(([^)(]*(?:\\([^)(]*(?:\\([^)(]*(?:\\([^)(]*\\)[^)(]*)*\\)[^)(]*)*\\)[^)(]*)*)\\)",
"`([^`]*)`",
},
},
},
},
},
}

1
lua/lsp/taplo.lua Normal file
View file

@ -0,0 +1 @@
return {}

1
lua/lsp/vtsls.lua Normal file
View file

@ -0,0 +1 @@
return {}

19
lua/lsp/yamlls.lua Normal file
View file

@ -0,0 +1,19 @@
return {
settings = {
yaml = {
schemaStore = {
-- You must disable built-in schemaStore support if you want to use
-- this plugin and its advanced options like `ignore`.
enable = false,
-- Avoid TypeError: Cannot read properties of undefined (reading 'length')
url = "",
},
schemas = require('schemastore').yaml.schemas(),
},
redhat = {
telemetry = {
enabled = false
}
}
},
}

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",