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.
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
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 thedidChangeWatchedFiles
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.