Bugfix: Shows error on failed startup (adds on_stderr handler)

This commit is contained in:
Harrison Cramer
2023-08-06 22:03:02 -04:00
parent 5f5f5d63c0
commit 6ab8cfdc55

View File

@@ -44,7 +44,6 @@ M.setup = function(args)
.. " " .. " "
.. state.LOG_PATH .. state.LOG_PATH
vim.fn.jobstart(command, { vim.fn.jobstart(command, {
on_stdout = function(job_id) on_stdout = function(job_id)
if job_id <= 0 then if job_id <= 0 then
@@ -58,6 +57,9 @@ M.setup = function(args)
end) end)
end end
end, end,
on_stderr = function(_, error)
vim.notify(error[1], vim.log.levels.ERROR)
end
}) })
end end