-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hanging on "Roots scanned" in Neovim but not vscode #12613
Comments
Happens on a very small project as well. (well, tokio + axum, but basic otherwise) Are you on M1 mac by any chance? I had no issues on linux with this before. |
@andoriyu I am on an M1 mac |
If you open RA process in activity monitor you will see which files it's scanning. It's not stuck, it's just very slow. I had to change RA config to explicitly exclude certain directories for it to stop doing that by adding dirs to Folder in my case was |
Ahhh yeah that is whats happening. Ok I should be able to figure it out then. Thanks! |
I face the same issues with Neovim and esp-idf projects. Roots scanned never ends. I couldn't figure out how to solve this. |
I had a similar issue while trying to set up development for GNOME Fractal in Visual Studio Code. Configuring {
"files.watcherExclude": {
"**/_build": true,
"**/.classpath": true,
"**/.dart_tool": true,
"**/.factorypath": true,
"**/.flatpak-builder": true,
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/.idea": true,
"**/.project": true,
"**/.scannerwork": true,
"**/.settings": true,
"**/.venv": true,
"**/node_modules": true
},
"rust-analyzer.files.excludeDirs": [
"_build",
".dart_tool",
".flatpak-builder",
".git",
".gitlab",
".gitlab-ci",
".gradle",
".idea",
".next",
".project",
".scannerwork",
".settings",
".venv",
"archetype-resources",
"bin",
"hooks",
"node_modules",
"po",
"screenshots",
"target"
]
} |
Show which roots are being scanned in progress messages This changes the `Roots Scanned` message to include the directory being scanned. Before: `Roots Scanned 206/210 (98%)` After: `Roots Scanned 206/210: .direnv (98%)` This makes it a lot easier to tell that `rust-analyzer` isn't crashed, it's just trying to scan a huge directory. See: #12613
Sorry to bother people on this old issue. How would one identify files that are not excluded but should on linux (i.e the activity monitor from macOS is not available) ? On a large repo, I am currently experiencing a ~3 seconds freeze in nvim but not in vscode EDIT: I just updated rust-analyzer and it now displays the directory being scanned, and I see nothing unexpected, it's just the repo being huge. I think it's more a neovim issue than a rust analyzer issue. |
This may not be related, but just in case - I was seeing similar behaviour with rust-analyzer in NeoVim on macOS, and it was down to how the LSP configuration was constructed and an interaction betwen the recommended configuration of hrsh7th/cmp-nvim-lsp and RA's behaviour when file watching is not available (?). Detailed report on a relevant issue in cmp-nvim-lsp, but the quick fix was to ensure |
Thank you so much for posting this! This just finally did it! I was getting so tired of using VSCode but my codebase was always stuck in Neovim until I enabled dynamicRegistration. I can't thank you enough for posting. |
rust-analyzer ad6810e 2022-06-08 dev
rustc 1.63.0-nightly (b2eed72a6 2022-05-22)
I'm running rust analyzer inside of neovim and I am getting an issue similar to #8161 where rust analyzer is hanging on "Roots Scanned". This happens inside of neovim but it doesn't happen when I open the project inside of VSCode.
This also doesn't happen inside of most of my rust projects. It's happening using the esp-idf-template for an embedded project.
I've gone through the troubleshooting guide but I haven't found any more useful information. Any other tips on how else can I debug what is going on here?
The text was updated successfully, but these errors were encountered: