The current file watcher functionality is (at least in my experience) reliable enough, but there's enough edge cases / general weirdness that I don't feel confident calling it stable. Trying to correlate separate events and determine whether they constitute a single rename event is, ultimately, too brittle.
Ideally, what we could do is use a generic file watching implementation as a base so that this plugin can focus on providing a good experience when updating imports (which itself has quite a few edge cases). For example, the WIP didChangeWatchedFiles handler from neovim/neovim#16214 is very promising, and we could either repurpose the entire handler or use the code as a starting point for improving the implementation here.
I don't plan on improving the file watcher here. Once the handler is implemented upstream, we should work on adding support to typescript-language-server and integrate with it as needed.
The current file watcher functionality is (at least in my experience) reliable enough, but there's enough edge cases / general weirdness that I don't feel confident calling it stable. Trying to correlate separate events and determine whether they constitute a single rename event is, ultimately, too brittle.
Ideally, what we could do is use a generic file watching implementation as a base so that this plugin can focus on providing a good experience when updating imports (which itself has quite a few edge cases). For example, the WIP
didChangeWatchedFiles
handler from neovim/neovim#16214 is very promising, and we could either repurpose the entire handler or use the code as a starting point for improving the implementation here.