feat(lsp): add actionable advice to lsp client quit error msg (#24510)

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
This commit is contained in:
Mathias Fußenegger 2023-07-29 16:10:40 +02:00 committed by GitHub
parent 2736cb3adf
commit 996dd36c77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1260,8 +1260,13 @@ function lsp.start_client(config)
changetracking.reset(client) changetracking.reset(client)
end end
if code ~= 0 or (signal ~= 0 and signal ~= 15) then if code ~= 0 or (signal ~= 0 and signal ~= 15) then
local msg = local msg = string.format(
string.format('Client %s quit with exit code %s and signal %s', client_id, code, signal) 'Client %s quit with exit code %s and signal %s. Check log for errors: %s',
name,
code,
signal,
lsp.get_log_path()
)
vim.notify(msg, vim.log.levels.WARN) vim.notify(msg, vim.log.levels.WARN)
end end
end) end)