nextflow-io / language-server

The Nextflow language server
Apache License 2.0
9 stars 0 forks source link

Listen for Git operations that change files #27

Open bentsherman opened 2 months ago

bentsherman commented 2 months ago

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 commented 2 months ago

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