-
Notifications
You must be signed in to change notification settings - Fork 306
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
Add support for workspace/didChangeWatchedFiles #1048
base: master
Are you sure you want to change the base?
Conversation
…to did-change-watched-files
One option would be to do something like this so we get full watch support. https://github.com/mattn/vim-filewatcher. wondering if we should have that extra dep the exe and fallback to your method? neovim might have full watch support. |
//cc @mattn in case he has any thoughts. |
Nice, I didn't realize there was an existing plugin for that. I think preferring that makes sense if it's installed. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Sorry, I had lost the ping to me. Which the server can I test this PR? |
I was using this with eclipse.jdt.ls. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
gopls support didChangeWatchedFiles. https://github.com/search?q=repo%3Agolang%2Ftools%20didChangeWatchedFiles%20&type=code |
@dradtke Can you please fix conflicts? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This PR adds basic support for
workspace/didChangeWatchedFiles
. When the server registers watchers, those watchers are saved to the server's configuration, and a modification to any file matching one of the glob patterns will trigger a notification to the server.My primary use-case for this change was to support the modification of SQL resource files within a Java project. Without this, any modifications to a SQL file requires restarting Vim in order to force the language server to see the changes. With this, those changes are picked up seamlessly as if they were regular Java source files.
The design of this feature is very rough, and primarily intended to get it working as a proof-of-concept. I fully expect there to be suggestions on how to improve it, so feedback is welcome!