rust-lang / rust-lang/rust-analyzer

Errors in code doesn't show unless file is written.

Open
#10,884 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

Hello, I was trying to set up rust-analyzer for neovim and found out that the error messages would only appear if I write the file. E.g. when I put in some gibberish nothing would show on the side of the code telling me that this should not be here, only after I do :w would I get an error message shown. This was not the case for me when I setup C using ccls and Python with pyright. I'm using lsp-config to configure my lang servers, and have tried both rust-tools and rust-analyzer by itself, still the same behavior.

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 report in Neovim with rust-analyzer, comparing unsaved edits with the behavior after :w. The payload names no source files or tests; done means diagnostics appear for invalid unsaved Rust code without requiring a write, with the relevant configuration and environment recorded.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.