-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
A-project-modelproject model and workspace related issuesproject model and workspace related issuesC-bugCategory: bugCategory: bug
Description
When I open a new file in tests/ (e.g. tests/my_test.rs), rust-analyzer gives an unlinked file diagnostic:
This file is not included in any crates, so rust-analyzer can't offer IDE services.
If you're intentionally working on unowned files, you can silence this warning by adding "unlinked-file" to rust-analyzer.diagnostics.disabled in your settings. [unlinked-file]
Once I restart the rust-analyzer process, the file is loaded correctly. This may be related to #9910, but I only have this issue with files under the tests/ directory.
rust-analyzer version: rust-analyzer 2024-09-02
rustc version: rustc 1.81.0 (eeb90cda1 2024-09-04)
editor or extension: Neovim with native LSP
relevant settings: https://github.com/9999years/dotfiles/blob/205a5d1738c5520759512bf82454d04059b3b1b3/config/nvim/init.lua#L911-L949
rcorre, robjwells, hotburnburn and WhyNotHugo
Metadata
Metadata
Assignees
Labels
A-project-modelproject model and workspace related issuesproject model and workspace related issuesC-bugCategory: bugCategory: bug