rust-lang / rust-lang/rust-analyzer

Why load all folders in workspace

Open
#11,588 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C-support S-unactionable
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

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.

image

Why not just load the folder which user had open rust file in it?

For example, when I open the main.rs in folder enums, just load the metadata of this crate.

My workspace settings:

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how rust-analyzer discovers and loads workspace crates, using the reported multi-folder workspace as the reproduction case. The issue’s proposed outcome is that opening a Rust file loads only its relevant crate metadata rather than every folder, but the payload names no source files or tests to begin with.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.