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

Restart language server – a generic solution #76405

Closed
borekb opened this issue Jul 1, 2019 · 4 comments
Closed

Restart language server – a generic solution #76405

borekb opened this issue Jul 1, 2019 · 4 comments
Assignees
Labels
api feature-request Request for new features or functionality
Milestone

Comments

@borekb
Copy link

borekb commented Jul 1, 2019

Quite often, I encounter a situation where some language server misbehaves and I have to Reload Window as the only workaround. I don't like doing that, though, as it also stops all running tasks, restarts terminals, etc.

I know some language servers implement their own "restart language server" command, for example, TypeScript has Restart TS Server and there are some third-party feature requests like microsoft/vscode-cpptools#1152 or microsoft/vscode-go#2324 but would there be a way to provide this as a VSCode-wide command that works across extensions?

I can imagine that a new API would need to be proposed that the extensions would need to implement, and I'm not sure how that works, but from the user perspective I'd very much appreciate the feature.

@kealjones-wk
Copy link

Where is this at homies? it's been 2 years.

@KealJones
Copy link

+1 to what @kealjones-wk said.

@dbaeumer
Copy link
Member

I looked into this when I added the Restart command for ESLint. At the end I decided against it since all ESLint commands should usually be found by typing ESLint into the command palette.

What I did do is the following: I improved the LSP libraries so that a restart command is easy to implement. Just call client.restart().

One additional note: if you hook any special request / notification handlers after onReady() you need to do the same after a restart since the listeners might to start in a different state.

@dbaeumer
Copy link
Member

I will close the issue since the coding happened in vscode-languageserver-node

@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

5 participants