You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that triggering "Restart server" on a file with active LSP-rust-analyzer session typically results in didClose being sent to the newly created session which is probably also the reason that inlay hints don't always show up properly after such action.
It looks like the culprit is the code that triggers after old session was destroyed but after new session has already started. This then destroys SessionView based on config name which obviously is not a good key for differentiating two instances of the Session for the same server.
I think this is also the cause for infinite initialize -> exit loops when you move a tab between windows and if it was the last tab of the session (doesn't happen all the time, but more often than not).
ensure that only one instance of given config is running at the time (fully shut down one before starting another one)
have unique/random IDs for each session
In the second case, we'd still have to use config name for at least auto complete triggers settings since on restarting ST we need to be able to lookup existing settings.
Describe the bug
I've noticed that triggering "Restart server" on a file with active LSP-rust-analyzer session typically results in
didClose
being sent to the newly created session which is probably also the reason that inlay hints don't always show up properly after such action.It looks like the culprit is the code that triggers after old session was destroyed but after new session has already started. This then destroys SessionView based on config name which obviously is not a good key for differentiating two instances of the Session for the same server.
LSP/plugin/documents.py
Lines 222 to 228 in 346599a
To Reproduce
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: