Keep server alive for a project #141
Description
In Scala projects it makes sense to keep language server alive for the whole project, because the startup is quite slow.
Currently, server is started only when I open a Scala source, then every time I close the last tab with Scala source, server is stopped and if I open a new tab, new server is started again.
I'd like to implement a workflow where server is started when I open a new project (in Atom terminology) which looks like a Scala project (checking sbt or ENSIME configuration files presence), then stop it only when the project is removed from the workspace.
I thought at first, that this method could be helpful:
atom-languageclient/lib/auto-languageclient.js
Lines 75 to 76 in 1153b29
But this is about adding condition on an editor, not workspace or project. I also see that server is considered unused and is stopped when all associated editors are closed in
atom-languageclient/lib/server-manager.js
Line 158 in 1153b29
But I don't know how to override this behavior for my client. Is it possible to do? And if not, would it be viable to support such workflow?