rust-analyzer diagnostics disappear after indexing
##Diagnostics from rust-analyzer disappear Diagnostics from cargo clippy display, but then disappear or change. When I restart rust-analyzer, clippy completes and I’ll see verbose diagnostics (this is good). After indexing completes, few diagnostics show and they are less verbose. In this example, the unused import and unused variable display after clippy is done. Then, they disappear and I only see “unused variable” after ‘indexing’ completes. (Sometimes all the diagnostics disappear) I expected to see the clippy diagnostics without it disappearing or changing. Is there a way to configure nvim/rustaceanvim/rust-analyzer or etc to display the diagnostics from clippy? Is this a bug in rustaceanvim, rust-analyzer, or something else? gif:



- install rust-analyzer 2026-02-24 directly from the github page
- create a new project
cargo new myproject
- add something that would show a warning
let unused_var = 0;
- run nvim with the minimal config
nvim -u minimal.lua src/main.rs
- restart rustanalyzer
:RustAnalyzer restart.
”` – minimal.lua – modified nvim config from rustaceanvim – see: https://github.com/mrcjkb/rustaceanvim/blob/master/troubleshooting/minimal.lua – turned on diagnostics – display lsp state in bottom right corner – add rustanalyzer settings
vim.diagnostic.config({
virtual_text = true, -- show inline messages
signs = true, -- show signs in the gutter
underline = true, -- underline problematic text
update_in_insert = false, -- don't update diagnostics while typing
severity_sort = true, -- sort diagnostics by severity
}