Comments (6)
If there was a setting to keep the server running as long as I have a Rust project open, that would be ideal to me.
There could be a global setting that changes the current behavior. It would affect all servers though.
Alternatively there could be a per-server setting to decide that.
Some servers like LSP-json start very fast and are not really project-aware so in those cases it shouldn't be noticeable if those are closed so maybe a per-server setting makes more sense.
from lsp.
VS Code does not have this issue, at least with rust-analyzer. Once a Rust file is opened in a workspace, the server is started and it isn't closed until the workspace is closed. I think this is a significantly better behavior.
This is a standard behavior of https://github.com/sublimelsp/LSP that the server is closed after few seconds once the last file using it is closed. This is to not keep unused servers in memory taking space unnecessarily.
Is that behavior implemented in the LSP extension, or here, in LSP-rust-analyzer?
In my personal workflow I tend to always keep some files open and don't clean up the whole workspace before opening a new file. And I imagine this to be the most common flow since there seems to be little benefit in closing all files IMO.
I don't think it's that uncommon. Once I've completed working on one task, especially within one part of the codebase, it's nice to be able to clear my plate and close some files. Waiting for the server to start back up again is not fun.
Not sure what would be a satisfying solution for you? Maybe just extending the time before the server shutsdown to 30s or so?
I don't think the server should shut down at all in this case. If I have a Rust project open, I am likely to work in that Rust project and use the LSP features. If I am done working on the project, I'll close it. Especially in a large project, the cost of restarting the server is extremely high.
If there was a setting to keep the server running as long as I have a Rust project open, that would be ideal to me.
from lsp.
This is a standard behavior of https://github.com/sublimelsp/LSP that the server is closed after few seconds once the last file using it is closed. This is to not keep unused servers in memory taking space unnecessarily.
In my personal workflow I tend to always keep some files open and don't clean up the whole workspace before opening a new file. And I imagine this to be the most common flow since there seems to be little benefit in closing all files IMO.
Not sure what would be a satisfying solution for you? Maybe just extending the time before the server shutsdown to 30s or so?
from lsp.
I've opened an issue in the LSP repo about the possibility of having that setting.
from lsp.
Related, and the root cause: rust-lang/rust-analyzer#4712
from lsp.
I tried configuring ra-multiplex
, the workaround folks have mentioned in rust-lang/rust-analyzer#4712.
I wasn't able to get it running in Sublime Text on my system. I'm not sure if it's a Windows compatibility issue, something with the LSP mechanism, or something I didn't do correctly.
from lsp.
Related Issues (20)
- Capabilites with selector fails to register
- ModuleNotFoundError: No module named 'wcmatch.glob' HOT 13
- Prepare for upgrade of bracex and wcmatch libraries HOT 6
- [Runtime Error] ModuleNotFoundError: No module named 'wcmatch' HOT 1
- Investigate why didSave notification is not sent if view closed immediately after saving
- Two alternative hover definitions provided: one on mouseover, the other upon keyboard shortcut HOT 6
- Not Working After 3.8 Upgrade HOT 3
- Discuss removal of some APIs HOT 3
- Allow LSP packages to customize format_completion HOT 1
- Support list of commands, provided by language servers HOT 5
- Syntax highlighting in popups, returned by 3rd party language server, not work HOT 9
- Package is not installable HOT 5
- MissingUriError: View has no URI HOT 1
- `websocket_server` installs a root logger
- Cannot install LSP on clean installation HOT 15
- Updated to LSP 2.1.0 leads to FileNotFoundError and no LSP HOT 4
- `lsp_code_actions_on_save` do not work intermittently HOT 8
- KeyError on file-watcher HOT 2
- Replace `Enum` object with it's scalar value in the LSP log panel? HOT 1
- Text selection in popups HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp.