reinstalled lspconfig
This commit is contained in:
parent
921457f15e
commit
a009ea2d76
22 changed files with 27 additions and 137 deletions
|
|
@ -1,37 +0,0 @@
|
|||
return {
|
||||
cmd = { "vscode-eslint-language-server", "--stdio" },
|
||||
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue", "svelte", "astro" },
|
||||
root_markers = { ".git" },
|
||||
settings = {
|
||||
codeAction = {
|
||||
disableRuleComment = {
|
||||
enable = true,
|
||||
location = "separateLine"
|
||||
},
|
||||
showDocumentation = {
|
||||
enable = true
|
||||
}
|
||||
},
|
||||
codeActionOnSave = {
|
||||
enable = false,
|
||||
mode = "all"
|
||||
},
|
||||
experimental = {
|
||||
useFlatConfig = false
|
||||
},
|
||||
format = true,
|
||||
nodePath = "",
|
||||
onIgnoredFiles = "off",
|
||||
problems = {
|
||||
shortenToSingleLine = false
|
||||
},
|
||||
quiet = false,
|
||||
rulesCustomizations = {},
|
||||
run = "onType",
|
||||
useESLintClass = false,
|
||||
validate = "on",
|
||||
workingDirectory = {
|
||||
mode = "location"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
cmd = { "gopls" },
|
||||
filetypes = { "go", "gomod", "gowork", "gotmpl" },
|
||||
root_markers = { ".git" },
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
|
||||
return {
|
||||
cmd = { "vscode-json-language-server", "--stdio" },
|
||||
filetypes = { "json", "jsonc" },
|
||||
root_markers = { "." },
|
||||
|
||||
capabilities = capabilities,
|
||||
init_options = {
|
||||
provideFormatter = true
|
||||
},
|
||||
single_file_support = true,
|
||||
settings = {
|
||||
json = {
|
||||
schemas = require('schemastore').json.schemas(),
|
||||
validate = { enable = true },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
cmd = { "lemminx" },
|
||||
filetypes = { "xml", "xsd", "xsl", "xslt", "svg" },
|
||||
root_markers = { "." },
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
return {
|
||||
cmd = { "pyright-langserver", "--stdio" },
|
||||
filetypes = { "python" },
|
||||
root_markers = { "pyproject.toml" },
|
||||
|
||||
settings = {
|
||||
python = {
|
||||
analysis = {
|
||||
autoSearchPaths = true,
|
||||
diagnosticMode = "openFilesOnly",
|
||||
useLibraryCodeForTypes = true
|
||||
}
|
||||
}
|
||||
},
|
||||
single_file_support = true
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
cmd = { "ruff", "server" },
|
||||
filetypes = { "python" },
|
||||
root_markers = { "pyproject.toml" },
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
return {
|
||||
cmd = { "rust-analyzer" },
|
||||
filetypes = { "rust" },
|
||||
root_makers = { "Cargo.toml", ".git" },
|
||||
capabilities = {
|
||||
experimental = {
|
||||
serverStatusNotification = true
|
||||
}
|
||||
},
|
||||
single_file_support = true,
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
return {
|
||||
cmd = { "taplo", "lsp", "stdio" },
|
||||
filetypes = { "toml" },
|
||||
single_file_support = true,
|
||||
root_markers = { "." }
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
cmd = { "vtsls", "--stdio" },
|
||||
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" },
|
||||
root_markers = { ".git" },
|
||||
}
|
||||
1
lua/lsp/eslint.lua
Normal file
1
lua/lsp/eslint.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
return {}
|
||||
1
lua/lsp/gopls.lua
Normal file
1
lua/lsp/gopls.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
return {}
|
||||
8
lua/lsp/jsonls.lua
Normal file
8
lua/lsp/jsonls.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
settings = {
|
||||
json = {
|
||||
schemas = require('schemastore').json.schemas(),
|
||||
validate = { enable = true },
|
||||
},
|
||||
},
|
||||
}
|
||||
1
lua/lsp/lemminx.lua
Normal file
1
lua/lsp/lemminx.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
return {}
|
||||
|
|
@ -1,8 +1,4 @@
|
|||
return {
|
||||
cmd = { "lua-language-server" },
|
||||
filetypes = { "lua" },
|
||||
root_markers = { ".git" },
|
||||
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
1
lua/lsp/pyright.lua
Normal file
1
lua/lsp/pyright.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
return {}
|
||||
1
lua/lsp/ruff.lua
Normal file
1
lua/lsp/ruff.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
return {}
|
||||
1
lua/lsp/rust_analyzer.lua
Normal file
1
lua/lsp/rust_analyzer.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
return {}
|
||||
|
|
@ -1,16 +1,4 @@
|
|||
return {
|
||||
cmd = { "tailwindcss-language-server", "--stdio" },
|
||||
filetypes = {
|
||||
"aspnetcorerazor", "astro", "astro-markdown", "blade", "clojure",
|
||||
"django-html", "htmldjango", "edge", "eelixir", "elixir", "ejs",
|
||||
"erb", "eruby", "gohtml", "gohtmltmpl", "haml", "handlebars", "hbs",
|
||||
"html", "htmlangular", "html-eex", "heex", "jade", "leaf", "liquid",
|
||||
"markdown", "mdx", "mustache", "njk", "nunjucks", "php", "razor",
|
||||
"slim", "twig", "css", "less", "postcss", "sass", "scss", "stylus",
|
||||
"sugarss", "javascript", "javascriptreact", "reason", "rescript",
|
||||
"typescript", "typescriptreact", "vue", "svelte", "templ" },
|
||||
root_markers = { ".git" },
|
||||
|
||||
settings = {
|
||||
tailwindCSS = {
|
||||
classAttributes = { "class", "className", "classList", "class:list", "ngClass", "pathClassName" },
|
||||
1
lua/lsp/taplo.lua
Normal file
1
lua/lsp/taplo.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
return {}
|
||||
1
lua/lsp/vtsls.lua
Normal file
1
lua/lsp/vtsls.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
return {}
|
||||
|
|
@ -1,8 +1,4 @@
|
|||
return {
|
||||
cmd = { "yaml-language-server", "--stdio" },
|
||||
filetypes = { "yaml", "yaml.docker-compose", "yaml.gitlab" },
|
||||
root_markers = { "." },
|
||||
|
||||
settings = {
|
||||
yaml = {
|
||||
schemaStore = {
|
||||
|
|
@ -20,5 +16,4 @@ return {
|
|||
}
|
||||
}
|
||||
},
|
||||
single_file_support = true
|
||||
}
|
||||
|
|
@ -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",
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue