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

Listen for Git operations that change files #27

Open
bentsherman opened this issue Sep 11, 2024 · 1 comment
Open

Listen for Git operations that change files #27

bentsherman opened this issue Sep 11, 2024 · 1 comment

Comments

@bentsherman
Copy link
Member

Git operations such as reverting changes and switching branches don't seem to trigger didChange events for files that aren't open. I think the solution is to hook into the didChangeWatchedFiles event for all files in the ast cache, then vscode will watch for filesystem events.

Being able to switch the branch without restarting the language server would be very convenient.

@bentsherman
Copy link
Member Author

Interesting, doing a global search & replace does emit a didChange for every affected file. I'm guessing it's because the replace does a WorkspaceEdit whereas the Git UI just delegates to git

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

No branches or pull requests

1 participant