AstroNvim / AstroNvim/astrocommunity
[Rust] Stuck in the `roots scanned` state
- Dominant language
- Lua
- Stars
- 1.7k
- Forks
- 313
- PR merge metrics
- No merged PRs in 30d
Description
### Checklist
- [x] I have searched through the AstroNvim documentation
- [x] I have searched through the existing issues of this project
- [x] I have searched the existing issues of plugins related to this issue
- [x] I can replicate the bug with the minimal `repro.lua` provided below
### Neovim version (nvim -v)
0.12.1
### Operating system/version
macOS
### Terminal/GUI
Ghostty
### Describe the bug
There is an issue with the current `rustaceanvim` configuration. When entering a `Rust` project, it may get stuck in the `roots scanned` state. The following configuration needs to be added to resolve this. I hope the maintainers of the `Rust` package can consider fixing this.
## Solution
```lua
return {
"mrcjkb/rustaceanvim",
opts = function(_, opts)
return require("astrocore").extend_tbl(opts, {
server = {
default_settings = {
["rust-analyzer"] = {
files = {
exclude = {
".direnv",
".git",
".jj",
".github",
".gitlab",
"bin",
"node_modules",
"target",
"venv",
".venv",
},
-- Avoid Roots Scanned hanging, see https://github.com/rust-lang/rust-analyzer/issues/12613#issuecomment-2096386344
watcher = "client",
},
},
},
},
})
end,
}
```
### Steps to Reproduce
null
### Expected behavior
null
### Screenshots
_No response_
### Additional Context
_No response_
### Minimal configuration
```Lua
null
```
Contributor guide
Research direction
Start by locating the AstroNvim rustaceanvim plugin configuration and reviewing how its rust-analyzer settings are assembled. Reproduce the issue in a Rust project using the provided configuration, then verify that entering the project no longer remains stuck in the “roots scanned” state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100