rust-lang / rust-lang/rust-analyzer

Disable indexing of generated filles

Open
#11,423 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi! I have a project where I have few very long generated files (100-150k lines of pre-computed constants) that I checked into the source tree. Ever since I checked these files in, Rust-Analyzer just hangs upon all requests (go to definition, code completion): everything is unresponsive. Is there a way to ask Rust-Analyzer to "exclude" some files from analyzing at all and preventing the irresponsive state?

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 with the linked generated directory and inspect how rust-analyzer discovers and indexes files in a project. Determine whether an existing exclusion mechanism can cover generated files and what behavior users should expect. Done means the large generated files no longer make requests unresponsive, with tests covering the supported exclusion behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.