-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No new dependencies detected (rust-analyzer) #2479
Comments
Not very familiar with the lsp side but I think maybe we are missing some events to send to language server? So I just mark this as enhancement. |
I've looked into this a bit and it seems the LSP spec expects the client (us) to support its rust-analyzer's Seems we'll need to drag in a dependency like notify to support the |
There is some prior work for file watching for the purposes of reloading #588 which pulls in the notify crate. That PR is using the v5 branch: #588 (comment) |
Good to know! I see that PR's been inactive for quite a while, and given that it does have file-watching functionality already, I'm not sure what the right thing to do would be. PR with similar watcher code, or something else? |
Yeah, I think you could either use it as a guide or even rebase the branch if the conflicts aren't too bad and work off of it if you'd like. I'm not sure what needs to be done on that to be mergeable but since it's been inactive for a while, a PR that supersedes it would definitely be welcome. Or you could just take the parts that would be needed for this feature if you're mostly interested on working on this issue rather than #1125 |
I think file watching is not needed for this; I suspect there is a bug in completions only. Maybe a cache that needs to be busted? If I have the files
use serde::Serialize;
fn main() {}
[package]
name = "foo"
version = "0.1.0"
[dependencies] Then helix will show an error; a Edit: Nevermind. I swear that's how it was working a moment ago, but I can't reproduce it now. |
I don't know how exactly to define the title.
When I open a rust workspace, everything goes fine, libraries and all are loaded, but when I add a new dependency inside Cargo.toml of a crate and try to use it in some file, it is not found or not available, I think that when I modify the Cargo.toml file, rust-analyzer does not verify the change and downloads the missing dependencies, the only way to make it appear is closing and reopening helix. In the case of vscode, as an example, when you add a new dependency, rust-analyzer verifies it and lets you use it in any file.
In helix:
In vscode:
The text was updated successfully, but these errors were encountered: