Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Keep server alive for a project #141

Open
@laughedelic

Description

@laughedelic

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:

// Determine whether we should start a server for a given editor if we don't have one yet
shouldStartForEditor(editor: atom$TextEditor): boolean {

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

async stopUnusedServers(): Promise<void> {

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions