Fix print all missing dependencies
This commit is contained in:
+14
-6
@@ -262,16 +262,24 @@ function P.language_servers(self)
|
|||||||
goto next_server
|
goto next_server
|
||||||
end
|
end
|
||||||
if server.dependencies ~= nil then
|
if server.dependencies ~= nil then
|
||||||
|
local not_installed = {}
|
||||||
for _, dep in ipairs(server.dependencies) do
|
for _, dep in ipairs(server.dependencies) do
|
||||||
if not utils.is_installed(dep) then
|
if not utils.is_installed(dep) then
|
||||||
utils.warn(
|
table.insert(not_installed, dep)
|
||||||
"Disabling " .. name .. " because " .. dep .. " is required but not installed",
|
|
||||||
module_name
|
|
||||||
)
|
|
||||||
server.enabled = false
|
|
||||||
goto next_server
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if #not_installed > 0 then
|
||||||
|
utils.warn(
|
||||||
|
("Disabling %s because the following required package(s) is not installed: %s"):format(
|
||||||
|
name,
|
||||||
|
table.concat(not_installed, ", ")
|
||||||
|
),
|
||||||
|
module_name
|
||||||
|
)
|
||||||
|
server.enabled = false
|
||||||
|
goto next_server
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
table.insert(self._language_servers, name)
|
table.insert(self._language_servers, name)
|
||||||
|
|||||||
Reference in New Issue
Block a user