jose-elias-alvarez / nvim-lsp-ts-utils

Utilities to improve the TypeScript development experience for Neovim's built-in LSP client.
The Unlicense
438 stars 18 forks source link

Improve file watcher #96

Closed jose-elias-alvarez closed 2 years ago

jose-elias-alvarez commented 2 years ago

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.

jose-elias-alvarez commented 2 years ago

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.