-
Notifications
You must be signed in to change notification settings - Fork 1.7k
rust-analyzer doesn't work fully for rust files which not in src folder #8009
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
Comments
This is a problem with the rustlings project structure, which does some special things that don't work with IDEs. See rust-lang/rustlings#443. On RA side, this is mostly a duplicate of #6388, which would make most features work in the exercise files. |
A fix specifically for rustlings: https://gist.github.com/jackos/7332fa8ab0b67a87f382fd566696f412 |
@jackos great! Maybe rustlings could generate this file automatically? 🤔 |
@flodiebold I opened a pull request to do that: rust-lang/rustlings#911 |
@flodiebold also I add this crate: https://crates.io/crates/rustlings-fix Just go into
And it'll generate the file |
For example, you open git repo rustlings. Then in the rustings/src directory, rust-analyzer works well. But in rustlings/exercises/some_topic/some_rust_file, rust-analyzer does not work except that it gives syntax error message if you have. I also test official rust extension independently, rls works in rustlings/exercises/some_topic/some_rust_file.
Note: When using rust-analyzer, I have disabled official rust extension.
The text was updated successfully, but these errors were encountered: