atom / atom-languageclient

Language Server Protocol support for Atom (the basis of Atom-IDE)
https://ide.atom.io/
MIT License
388 stars 78 forks source link

Add shutdownServersGracefully() config function #269

Closed alexheretic closed 4 years ago

alexheretic commented 5 years ago

This change allows language clients to override the default server stopping behaviour allowing faster kills, ie killing the server process without waiting for the shutdown response.

Client's can override the shutdownServersGracefully() method.

class Foo extends AutoLanguageClient {
  ...
  // Kill servers faster
  shutdownServersGracefully() { return false }
}

The default behaviour is unchanged. I'll use this in ide-rust as rls can be stuck building for long periods of time before it will shutdown, yet builds are safe to kill in this way.

This feature is also available in my fork:

"dependencies": {
  "atom-languageclient": "github:alexheretic/atom-languageclient#build",
}