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

Add support for workspace/didChangeWatchedFiles #1048

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dradtke
Copy link
Contributor

@dradtke dradtke commented Jan 15, 2021

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!

@prabirshrestha
Copy link
Owner

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.

@prabirshrestha
Copy link
Owner

//cc @mattn in case he has any thoughts.

@dradtke
Copy link
Contributor Author

dradtke commented Jan 19, 2021

Nice, I didn't realize there was an existing plugin for that. I think preferring that makes sense if it's installed.

@stale
Copy link

stale bot commented Mar 21, 2021

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.

@stale stale bot added the wontfix label Mar 21, 2021
@mattn
Copy link
Collaborator

mattn commented Mar 21, 2021

Sorry, I had lost the ping to me. Which the server can I test this PR?

@stale stale bot removed the wontfix label Mar 21, 2021
@dradtke
Copy link
Contributor Author

dradtke commented Mar 24, 2021

I was using this with eclipse.jdt.ls.

@stale
Copy link

stale bot commented Jun 2, 2021

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.

@stale stale bot added the wontfix label Jun 2, 2021
@stale stale bot closed this Jun 9, 2021
@mattn mattn reopened this Jun 27, 2023
@stale stale bot removed the wontfix label Jun 27, 2023
@mattn
Copy link
Collaborator

mattn commented Jun 27, 2023

@mattn
Copy link
Collaborator

mattn commented Jun 27, 2023

@dradtke Can you please fix conflicts?

@stale
Copy link

stale bot commented Sep 17, 2023

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.

@stale stale bot added the wontfix label Sep 17, 2023
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.

3 participants