-
Notifications
You must be signed in to change notification settings - Fork 16
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
Feature: Automatically restart language client when config or rules files change #75
Conversation
…lization test, otherwise mocha display a lot of red text
…tartLanguageClient' to convey that it does not immediately restart. 2) unsorted package.json dependencies which were automatically sorted by npm install. 3) removed a commented console.log statement. 4) Undid accidental upgrade of prettier from 3.0.0 to 3.4.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.
Thanks!
Looks like the two tests failed on Windows. Would you like to give it a look?
|
…for initial diagnostics to match their expectations, before actually testing diagnostic changes from file modifications
thanks! I'm running the test again and hope it pass! |
I'm merging this anyway since the windows fix is not okay anyway. If possible, would you like to have a separate pr to fix the issue? thanks! |
Thank you for your attention to detail in reviewing my code and for your helpful comments. I know you are busy so I've tried to avoid spamming you with notifications as best I know how. I would appreciate any advice about how I can improve my contribution. Thank you. |
Hi @StevenLove, the failing windows test has been fixed by pinning dep versions. |
Especially for new users, configuring ast-grep in VSCode can be difficult because you can forget to reload the extension in which case your changes to sgconfig.yml or to your rule files will have no effect on the reported diagnostics and code actions. This PR uses
vscode.workspace.FileSystemWatcher
s to monitorsgconfig.yml
and the rules files found atruleDirs[0]
and restarts theLanguageClient
when these files change. This PR includes mocha tests which verify the desired behavior and which add about 1s tonpm run test