mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +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
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user