rust-lang / rust-lang/rust-analyzer

excludeTests and excludeImports not working

Open
#18,199 3 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

Hello, I want to use rust-analyzer.references.excludeTests and rust-analyzer.references.excludeImports to exclude the content I am not interested in from the references. However, this did not work. I used vscode and installed rust-analyzer on a remote server. My local, server, and workspace rust-analyzer.references.excludeTests and rust-analyzer.references.excludeImports were all set to true, but this did not work.
To find the reason, I tried multiple versions. I used the latest version of rust-analyzer and rust 1.79.0, and these two settings did not work. Then I switched to version v0.3.1831 which added this feature, and it still did not work.
I don't know why this is happening. Did I miss some configuration?

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 reproducing the issue in VS Code with rust-analyzer on a remote server, using the workspace, server, and local settings named in the report. Compare reference results with the latest version and v0.3.1831, then inspect how references.excludeTests and references.excludeImports are applied. Done means identifying the configuration or implementation cause and confirming the settings affect reference results as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.