Restructuring

This commit is contained in:
2023-09-06 17:04:30 +02:00
parent 0dc2cf1f10
commit d84b64a6e6
42 changed files with 55 additions and 122 deletions
+17 -4
View File
@@ -14,7 +14,7 @@
limitations under the License.
]]
local module_name = "lsp"
local package_name = "lsp"
local utils = require("utils")
local P = {}
@@ -24,7 +24,20 @@ P._language_servers = nil
P.capabilities = {}
P.servers = require("lsp.servers")
P.servers = {
bashls = {},
clangd = {},
cmake = {},
diagnosticls = {},
groovyls = {},
jedi_language_server = {},
lemminx = {},
lua_ls = {},
}
for name, _ in pairs(P.servers) do
P.servers[name] = require("lsp.config." .. name)
end
function P._setup_diagnostic()
vim.diagnostic.config({
@@ -275,7 +288,7 @@ function P.language_servers(self)
name,
table.concat(not_installed, ", ")
),
module_name
package_name
)
server.enabled = false
goto next_server
@@ -296,7 +309,7 @@ function P.language_servers(self)
name,
table.concat(not_installed, ", ")
),
module_name
package_name
)
server.enabled = false
goto next_server
-34
View File
@@ -1,34 +0,0 @@
--[[
Copyright 2023 Oscar Wallberg
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
]]
local servers = {
"bashls",
"clangd",
"cmake",
"diagnosticls",
"groovyls",
"jedi_language_server",
"lemminx",
"lua_ls",
}
local manifest = {}
for _, name in ipairs(servers) do
manifest[name] = require("lsp.servers." .. name)
end
return manifest