Shutdown language servers better (#35038)
Follow-up of https://github.com/zed-industries/zed/pull/33417 * adjust prettier mock LSP to handle `shutdown` and `exit` messages * removed another `?.log_err()` backtrace from logs and improved the logging info * always handle the last parts of the shutdown logic even if the shutdown response had failed Release Notes: - N/A
This commit is contained in:
parent
2a9355a3d2
commit
2658b2801e
2 changed files with 33 additions and 27 deletions
|
@ -152,6 +152,10 @@ async function handleMessage(message, prettier) {
|
|||
throw new Error(`Message method is undefined: ${JSON.stringify(message)}`);
|
||||
} else if (method == "initialized") {
|
||||
return;
|
||||
} else if (method === "shutdown") {
|
||||
sendResponse({ result: {} });
|
||||
} else if (method == "exit") {
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
if (id === undefined) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue