-
Notifications
You must be signed in to change notification settings - Fork 79
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
Added xml.restart.language.server
command for language server restart
#551
Conversation
If someone else can quickly confirm for me, when running the command, the client command registration seems to re-trigger, which tells me that the language client is restarting. Can someone confirm this, or give me another check to see if the language client has restarted? |
Thanks for the PR! The best option to check this is to inspect the processes ( |
xml.restart.language.server
commandxml.restart.language.server
command (draft)
Is there a reason that this is still on draft? The original implementation seemed fine and the linked issue is still open... |
There is a work around: we can apply the same logic as restart(), as the need to update |
xml.restart.language.server
command (draft)xml.restart.language.server
command for language server connection restart
src/commands/registerCommands.ts
Outdated
function registerRestartLanguageServerCommand(context: ExtensionContext, languageClient: LanguageClient) { | ||
context.subscriptions.push(commands.registerCommand(ClientCommandConstants.RESTART_LANGUAGE_SERVER, async () => { | ||
// Can be replaced with `await languageClient.restart()` with vscode-languageclient ^8.0.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use
await languageClient.restart()
once we move to vscode-languageclient ^8.0.1
Signed-off-by: Alexander Chen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change works very well for me.
I was considering just leaving the timeout even when run outside of debug mode, but given that restart() will have the timeout, we may as well run it that way.
@AlexXuChen , may be worth adding to https://github.com/redhat-developer/vscode-xml/blob/master/docs/Commands.md as well. |
xml.restart.language.server
command for language server connection restartxml.restart.language.server
command for language server restart
Added
xml.restart.language.server
command to trigger language server restart.Closes #539
Signed-off-by: Alexander Chen [email protected]