atom-languageclient
atom-languageclient copied to clipboard
Hook to server termination
There are methods like preInitialization and postInitialization, but I don't see any way to hook to the shutdown routine and perform some cleanup actions. I see exitCleanup method, but it's private.
@laughedelic Would this be when the server is intentionally closed, or if it crashes and is restarted as well?
@Aerijo when it's intentionally closed (which also covers restart).
My use case was that I create a status bar element to show some info from the server and when the server terminates I want to remove this element to avoid showing an outdated state. Otherwise it just gets stuck there.
In ide-rust I used:
postInitialization(server) {
...
server.process.on('exit', () => { ... })
}
Development of atom-languageclient has officially moved to https://github.com/atom-ide-community/atom-languageclient 🎉
If this is still an issue please consider opening an issue on that repo.