LSP-pyright
LSP-pyright copied to clipboard
Exception when "installing file system watcher"
In the server log panel I see this message:
LSP-pyright: Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
OS is Ubuntu 20.4. System node is v12. I have a Node v14 installed in $cache/Package Storage/lsp_utils/
https://github.com/paulmillr/chokidar says that on Linux fs.watch
API is used and that does not provide recursive watching...
Kinda surprising since this library is used "everywhere" so I don't get how it could not support such basic need...
Oh, somehow I've assumed that this is related to my https://github.com/sublimelsp/LSP-file-watcher-chokidar but I guess this is internal error from Pyright instead. In that case an issue in the Pyright repo would likely receive a quick response.
https://stackoverflow.com/questions/61806341/how-to-fix-the-feature-watch-recursively-is-unavailable-on-the-current-platform has relevant answer
Pyright could fix it so that it wouldn't pass recursive: true
on linux.
Maybe not a great idea in case support is added in the future but can always be refined later.