Merge pull request #14047 from mjlbach/feature/notify_on_crash

lsp: invoke vim.notify when client exits with code or signal other than 0
This commit is contained in:
Michael Lingelbach
2021-03-04 12:27:46 -08:00
committed by GitHub

View File

@@ -542,6 +542,13 @@ function lsp.start_client(config)
client_ids[client_id] = nil
end
if code ~= 0 or signal ~= 0 then
local msg = string.format("Client %s quit with exit code %s and signal %s", client_id, code, signal)
vim.schedule(function()
vim.notify(msg, vim.log.levels.WARN)
end)
end
if config.on_exit then
pcall(config.on_exit, code, signal, client_id)
end