An option to have the LSP auto restart when a new dependency is added #6951
-
Right now when I add a dependency to a project I have to restart the LSP manually to make the LSP aware of it. I think it would be nice to have an option of auto-reloading instead. For context I use rust-analyzer and pyright with Helix. If there is a way to progressively load new dependencies instead of a complete restart that would be even better but I have no idea if that is an option. For example in Rust I think watching Cargo.toml/Cargo.lock could be a way to accomplish this. It might not be easy to do for all languages though as there needs to be a clear way of monitoring when dependencies change. Let me know what you think :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
LSP servers already support automatically reloading dependenciss but it requires the client so watch certain files (specified by the server) but helix currently doesn't have a file watcher. There aren't any good solutions in pure rust. The notify crate is not robust at all (and the API doesn't work that well for us) and watchmen is an external binary that isbpackged nowhere and basically impossible to build yourself without using prebuild binaries from Facebook servers (so not really something I feel comfortable to depend on). I am working non my own file watcher that works like watchmen (so is robust/correct) written in rust as a library instead of as an external process |
Beta Was this translation helpful? Give feedback.
LSP servers already support automatically reloading dependenciss but it requires the client so watch certain files (specified by the server) but helix currently doesn't have a file watcher. There aren't any good solutions in pure rust. The notify crate is not robust at all (and the API doesn't work that well for us) and watchmen is an external binary that isbpackged nowhere and basically impossible to build yourself without using prebuild binaries from Facebook servers (so not really something I feel comfortable to depend on). I am working non my own file watcher that works like watchmen (so is robust/correct) written in rust as a library instead of as an external process