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

fix: reload language server client on restart #420

Merged

Conversation

ian-h-chamberlain
Copy link
Contributor

@ian-h-chamberlain ian-h-chamberlain commented Sep 13, 2024

Ensure the client watcher and output channel are disposed during a restart before the new client is creates, and also show a helper warning when certain variables are changed that require a restart.

Also catch errors starting the client, so that our restart configuration change handler is still registered in case the user fixes their serverPath or something like that. Similarly, always register the restart command in case user wants to start using language server after
not using it before.

Closes #419

Ensure the client watcher and output channel are disposed during a
restart before the new client is creates, and also show a helper warning
when certain variables are changed that require a restart.

Also catch errors starting the client, so that our restart configuration
change handler is still registered in case the user fixes their
serverPath or something like that. Similarly, always register the
restart command in case user wants to start using language server after
not using it before.

Closes nix-community#419
@jnoortheen jnoortheen merged commit 4c48cb0 into nix-community:main Sep 13, 2024
4 checks passed
@jnoortheen
Copy link
Collaborator

Thanks @ian-h-chamberlain !

@ian-h-chamberlain ian-h-chamberlain deleted the fix/reload-client-on-restart branch September 13, 2024 12:12
@ian-h-chamberlain ian-h-chamberlain restored the fix/reload-client-on-restart branch September 13, 2024 12:12
@ian-h-chamberlain ian-h-chamberlain deleted the fix/reload-client-on-restart branch September 13, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Nix: Restart Language Server" does not allow changing nix.serverPath
2 participants