-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Why load all folders in workspace #11588
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
You can set |
@bjorn3 I tried it, but useless. |
That is running the build scripts of all crates to get generated source files and compiling all proc macros. The results of this are cached by cargo, so you should only have to pay for it once if you don't change any build scripts or proc macros even if you restart rust-analyzer. If you want to disable this you can use set |
When I restart rust-analyzer, it will still load all crates again even if I didn't change anything. All the crates in my workspace doesn't depend each other. Why not rust-analyze analyzes the dependency relationship and load only the open folder and it's dependecies. |
I do wish there was an option to disable indexing everything whenever I open a crate within a workspace. Right now, the only workaround I've found is to temporarily comment the |
@calops have you tried disabling |
It is better with that setting (thanks for that), however it still builds all the proc macros of the other crates, and still It also seems to not index the dependencies of my crate when I do this? If that's right, it's still not a suitable solution for me. |
IIUC Your requirement seems not related to the issue. You want cargo-check without --workspace, then just set check.workspace to false since #16510 . |
Yeah that's fair, this new option solves my use-case. |
In following workspace, there are may folders. Each folder is a crate.
When I open this workspace, rust-analyzer will load all folders which heavily increae the timeout to get seamatic highlight and intellisence.
Why not just load the folder which user had open rust file in it?
For example, when I open the
main.rs
in folderenums
, just load the metadata of this crate.My workspace settings:
The text was updated successfully, but these errors were encountered: