migrate config form function to global variable

This commit is contained in:
asep komarudin 2023-03-05 17:34:12 +07:00
parent b6f0601d3d
commit 38d2c29a95
24 changed files with 248 additions and 245 deletions

View file

@ -9,14 +9,13 @@ local lspconfig = require("lspconfig")
-- local servers = { "jdtls", "yamlls" }
local servers = {}
local data_exists, custom_lsp = pcall(require, "custom.lsp_installer")
local data_exists, custom_lsp = pcall(require, "core.config")
if data_exists then
for _, client in pairs(custom_lsp.lspinstall) do
for _, client in pairs(custom_lsp.lsp_installer) do
table.insert(servers, client)
end
end
lsp_installer.setup({
ensure_installed = servers,
})