-
Notifications
You must be signed in to change notification settings - Fork 4.4k
rust lsp bug: code greyed out & 'file not included in crate hierarchy' #12847
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
Comments
ok no it also does the same now in vscode when using the release of today, maybe due to rust-lang/rust-analyzer#17378. downgrading RA in vscode from |
Do you have a |
this applies to every file in my project and yes of course this module is actually in the hierarchy, this module did not change and as stated above it must be related to the RA version so its clearly a problem in RA. still I would love to know how to forcefully set/downgrade the RA version in zed as in this state zed is basically bricked for me |
This was caused by rust-lang/rust-analyzer#17350. But it doesn't make RA emit a new warning, it just makes the span bigger, because the warning wasn't noticeable enough. Please make sure that there aren't any missing module declarations on the path to You can delete most files from your projects and most code from the remaining files. It doesn't need to build or run. |
can you specify what you mean? the files are work and are actually in the build when I use cargo. i suspected maybe the fact that I have this workspace structure where I have a main.rs and a lib.rs to maybe now breaking RA, so I tested against and indeed it breaks RA and triggers this: rust-lang/rust-analyzer#17376 I find the same error in the lang server logs in zed. strangely though the same does not happen in my project causing the issues here |
I'm also running into this as of today. It goes away once rust-analyzer has fully loaded the repository. Seems like an upstream change.
You can configure the binary manually in your Zed {
"lsp": {
"rust-analyzer": {
"binary": {
"path": "/Users/thorstenball/tmp/rust-analyzer-aarch64-apple-darwin" // <-- must be absolute path
}
}
}
} |
@extrawurst see also rust-lang/rust-analyzer#17386. |
yeah and that one is caused by: rust-lang/rust-analyzer#17378 |
I can report that zed with the new rust-analyzer release will close this one |
Check for existing issues
Describe the bug / provide steps to reproduce it
Closed source, so i cannot share a simple reproduction.
I just know the same project structure works fine in vscode with rust-analyzer. zed since today suddenly stoped working.
Environment
Zed: v0.139.3 (Zed Preview)
OS: macOS 14.5.0
Memory: 64 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
I expect to see normal syntax highlighting and code completion
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.The text was updated successfully, but these errors were encountered: