rust-lang / rust-lang/rust-analyzer

VS Code - cargo check error behavior

Open
#1,471 12 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

A recompilation after saving a file currently removes all linting information (warnings, errors) from the UI.

I find this behaviour quite annoying.

  • It's visually distracting to have the files jump between green/red and grey on each save
  • it prevents me from jumping from error to error and fixing them one by one. I have to either not save the file (which is not possible when you have autosave on focus change enabled ) or wait for the compilation to complete before I can see the next error

A mode (maybe optional, enabled via config) that keeps the error information and only patches it up once the recompilation is complete would be great.

(Happy to work on this myself)

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

The issue names no files, tests, or entry points. Start by tracing how VS Code diagnostics are cleared and refreshed during cargo check after a save, then identify the configuration and update path involved. Done means existing warnings and errors remain visible during recompilation and are replaced with current results when compilation completes.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.