Fix race when language server registers for `workspace/didChangeWatchedFiles` (#9177)

This fixes #8896 by storing the `watched_paths` in a separate HashMap,
allowing us to handle the request even before we mark the language
server as running.

Downside is that we have yet another data structure for language
servers, but it also makes the `Running` enum case a bit smaller.

And it fixes the race condition.

Release Notes:

- Fixed language servers not being notified of file changes if language
server registers for file-notification right after starting up.
([#8896](https://github.com/zed-industries/zed/issues/8896)).

Co-authored-by: Bennet <bennetbo@gmx.de>
Co-authored-by: Remco <djsmits12@gmail.com>
f066dd268fThorsten Ball committed on 3/11/2024, 3:30:30 PM· committed by GitHubparent0be20d0
1 file changedLine totals unavailable