chore check-dep: add init message
This commit is contained in:
@@ -16,15 +16,16 @@ function M.checkCommand(cmd, desc)
|
|||||||
p:close()
|
p:close()
|
||||||
|
|
||||||
if output == nil and desc ~= nil and desc ~= "" then
|
if output == nil and desc ~= nil and desc ~= "" then
|
||||||
vim.api.nvim_echo({ { "✗ " .. cmd .. " [" .. desc .. "] - not found!", "DiagnosticError" } }, true, {})
|
vim.api.nvim_echo({ { " ✗ " .. cmd .. " [" .. desc .. "] - not found!", "DiagnosticError" } }, true, {})
|
||||||
elseif output == nil then
|
elseif output == nil then
|
||||||
vim.api.nvim_echo({ { "✗ " .. cmd .. " not found!", "DiagnosticError" } }, true, {})
|
vim.api.nvim_echo({ { " ✗ " .. cmd .. " not found!", "DiagnosticError" } }, true, {})
|
||||||
else
|
else
|
||||||
vim.api.nvim_echo({ { "✓ " .. cmd, "DiagnosticOk" } }, true, {})
|
vim.api.nvim_echo({ { " ✓ " .. cmd, "DiagnosticOk" } }, true, {})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.run()
|
function M.run()
|
||||||
|
print("Check installed system commands:")
|
||||||
for i, cmd in ipairs(cmdsList) do
|
for i, cmd in ipairs(cmdsList) do
|
||||||
M.checkCommand(cmd.cmd, cmd.desc)
|
M.checkCommand(cmd.cmd, cmd.desc)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -11,5 +11,5 @@ require("check_dependencies").setup({
|
|||||||
{ cmd = "stylua", desc = "lua formatter"},
|
{ cmd = "stylua", desc = "lua formatter"},
|
||||||
|
|
||||||
-- Test not exists
|
-- Test not exists
|
||||||
{ cmd = "fff", desc = "lua formatter"},
|
{ cmd = "fff", desc = "test not exists command"},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user