mirror of
https://github.com/neovim/neovim.git
synced 2025-11-10 04:25:22 +00:00
lsp: invoke vim.notify when client exits with code or signal other than 0
This commit is contained in:
@@ -542,6 +542,13 @@ function lsp.start_client(config)
|
|||||||
client_ids[client_id] = nil
|
client_ids[client_id] = nil
|
||||||
end
|
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
|
if config.on_exit then
|
||||||
pcall(config.on_exit, code, signal, client_id)
|
pcall(config.on_exit, code, signal, client_id)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user