sublimelsp / LSP

Client implementation of the Language Server Protocol for Sublime Text

Home Page:https://lsp.sublimetext.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option to keep LSP server running while project open, even after last file is closed

LPGhatguy opened this issue · comments

Is your feature request related to a problem? Please describe.
When I'm working on a large Rust project using LSP-rust-analyzer, it takes a long time for the LSP server to start up.

If I close the files I am currently working on and then start working on another part of the codebase, I have to wait for the server to start up again. This can take up to a minute, and until that's complete, I have no LSP features.

Describe the solution you'd like
Once the rust-analyzer LSP server has started, I'd like it to stay running as long as I have the project open. A per-server configuration option might be a good way to opt into this behavior.

This is how VS Code's rust-analyzer LSP integration works. The server is started the first time the user opens a Rust file in a workspace, and the server continues running as long as the workspace is open.

Describe alternatives you've considered
I could make sure to always keep at least one Rust file open. Once I realized that this was the cause of my workflow issues, I've tried to start doing that, but it's easy to forget. Once I close the last Rust file, I'm forced to wait before I can start working again!

I could use VS Code, but I'd strongly prefer to stick with ST4. 😅

Additional context
I originally filed an issue about this at #2387. After a conversation there and looking at the code in that repo, it seems like an option in the LSP package would be the best option.