atom / atom-languageclient

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

Add language server restart API and auto-restart behavior #172

Closed daviwil closed 6 years ago

daviwil commented 6 years ago

Add AutoLanguageClient.restartServers API

This change adds a new restartServers() API to AutoLanguageClient so that implementors of the class can easily restart all active language servers for their client in the workspace.

Add language server auto-restart

This change adds language server auto-restart behavior when a language server exits or crashes unexpectedly. The restart logic allows a language server to be restarted up to 5 times within 3 minutes and then stops auto-restarting after reaching that limit.

j-f1 commented 6 years ago

Is there any way to make an error notification show up when you stop trying to restart the server?

damieng commented 6 years ago

Looks great! I do think we should tell the user if we give up trying to restart it though - at least for now. should be as easy as dropping a call in to atom.notifications.error

daviwil commented 6 years ago

Sounds good, will add that real quick!

daviwil commented 6 years ago

Added this, how's the wording look?

image

damieng commented 6 years ago

Looks good! Let's merge :)

daviwil commented 6 years ago

Done, thanks a lot!