sublimelsp / LSP-rust-analyzer

Convenience package for rust-analyzer
MIT License
70 stars 11 forks source link

Add stop server option #95

Closed kshitjj closed 1 year ago

kshitjj commented 1 year ago

Having the option to stop the rust analyzer server would be really good, as the rust analyzer takes a lot of CPU.

rchl commented 1 year ago

How do you envision this working exactly? When would it start working again?

There is already an option to disable server per-project (LSP: Disable Language Server in Project)

kshitjj commented 1 year ago

Well how I envision it is, there's an option to start and stop the server whenever I want. But why would one need the option to stop and start the server?

Rust-analyzer is RAM and CPU heavy, and when I am working on an rust project, I have might need to test/build/etc the project. So, running these "tasks" while the rust analyzer is running the background causes my PC to crash everytime.

So, having an option to stop the server while I am running some other task will be quite helpful.

rchl commented 1 year ago

You have

There is already an option to disable server per-project (LSP: Disable Language Server in Project)

Why is that not sufficient?

If you want a different way of stopping and starting then you have to think of how that flow should work, especially from the UI standpoint. Also give good enough reasons for having another way to do what seems to be the same thing.

predragnikolic commented 1 year ago

Hello @kshitjj

You have a couple of commands from the command pallete to start stop a server:

I do not believe that we need more ways to stop a server than I listed above. Thus I will close this issue.

If you still think otherwise, feel free to reopen it.