Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep sbt server running after metals exits (optionally) #165

Open
eatkins opened this issue Nov 23, 2020 · 1 comment
Open

Keep sbt server running after metals exits (optionally) #165

eatkins opened this issue Nov 23, 2020 · 1 comment

Comments

@eatkins
Copy link

eatkins commented Nov 23, 2020

Is your feature request related to a problem? Please describe.
With the metals bsp integration, if metals starts an sbt server and then I exit my editor, the server is killed by metals. This is intentional behavior but I find it undesirable. If I connect to the server spawned by metals with sbtn, then that client session abruptly terminates when I exit my editor. Also persisting the server allows metals to reconnect quickly to the running server the next time I open my editor rather than having to wait for a new server to spawn.

Describe the solution you'd like
I'd like there to be an option to allow metals to not kill the sbt server that it forked when it exits.

Additional context
A workaround is to start an sbt server before opening vim so that metals does not spawn a new server and instead connects to the running server.
Search terms:

@ckipp01
Copy link
Member

ckipp01 commented Dec 2, 2020

Thanks for the request @eatkins! I can understand how that behavior could be a bit frustrating if your open session just closes when Metals does. I've read through sbt/sbt#6176, and as I stated there, I just have a lot of caution when it comes to keeping the server alive after starting it, mainly because I'm not sure all users would want that, or if it'd be clear for users how to control it. So maybe having some sort of option to allow users to keep alive could be something that we'd look into.

Also, if I understand your pr in sbt/sbt#6177, this would benefit us in our situation with Metals correct? I had a similar question that was already asked in there, so I've subscribed over there and will watch the convo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants