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

lsp auto restarts #10640

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

l4l
Copy link
Contributor

@l4l l4l commented Apr 30, 2024

The implementation provides a hard-coded limit of 3 restarts per LSP stored at Client. On each restart it basically reduces the counter and spawns a job for starting LSP.

Resolves #6398

@pascalkuthe
Copy link
Member

Why did you move clients out of registry? The registry is supposed to be exactly that a list/registry of all lsp "clients"

@kirawi kirawi added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 30, 2024
@l4l
Copy link
Contributor Author

l4l commented Apr 30, 2024

It's still in the registry and the same mod. The two parts: the clients themself and the structures dependent on them. I would consider the refactored version seems way cleaner (in terms of more obvious invariants) and harder to make a mistake (e.g forget to add to name list). Though if disagree I may revert that, no problem

@the-mikedavis
Copy link
Member

The Registry type is already pretty small and self contained so I don't think we need a refactor like this. In general you should try to avoid making refactors that aren't crucial to make the end change, it just makes the changes harder to review.

@l4l l4l force-pushed the feat/lsp-auto-restarts branch from c77700e to 6df3039 Compare May 1, 2024 10:34
@l4l
Copy link
Contributor Author

l4l commented May 1, 2024

Sure, pushed a minimized patch

@l4l l4l force-pushed the feat/lsp-auto-restarts branch from 6df3039 to 5384b40 Compare May 1, 2024 10:39
@the-mikedavis the-mikedavis added S-waiting-on-review Status: Awaiting review from a maintainer. A-language-server Area: Language server client and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-server Area: Language server client S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically restart language servers which exit unexpectedly
4 participants