Skip to content
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

LSP issues because of too many errors #2072

Closed
senekor opened this issue Aug 7, 2024 · 2 comments
Closed

LSP issues because of too many errors #2072

senekor opened this issue Aug 7, 2024 · 2 comments

Comments

@senekor
Copy link
Contributor

senekor commented Aug 7, 2024

Hello, I'm testing rustlings for a workshop I'm organizing. Version 6 looks like it has a lot of improvements! One of them seems to be that rust-analyzer should work out of the box. However, it seems to be a little overwhelmed. There are so many errors in the workspace that it doesn't show all of them and it seems basically inactive on some exercises. I was able to observe this with the first few "variables" exercises already.

For me, from the perspective of a workshop organizer, there are two options that make sense:

  1. Somehow fix this to ensure the LSP experience is top-notch.
  2. Instruct my students to disable LSP alltogether.

The friction of fiddling around with LSP is enough to leave a bad first impression and suck the fun out of the first few minutes of writing Rust code. At the same time, the terminal output of rustlings is quite decent, making LSP support not absolutely required.

One experiment I've done is to edit the list of binaries in Cargo.toml. That actually works. If I only include the one currently being worked on, LSP is fine. So, it might be possible to have rustlings edit Cargo.toml as the student progresses through the exercises? I'm happy to try to contribute this if you think it could be the right way forward.

@mo8it
Copy link
Contributor

mo8it commented Aug 8, 2024

That's weird because I fixed this issue in Rust-Analyzer a month ago: rust-lang/rust-analyzer#17561

Are you sure that you have the latest Rust version 1.80 and that your Rust-Analyzer plugin is up-to-date (in case you use VS-Code)?

@senekor
Copy link
Contributor Author

senekor commented Aug 8, 2024

Weird. I am using helix with the rust-analyzer from rustup. I know that isn't as up-to-date as the vscode extension. But I'm pretty sure I also tested it with vscodium yesterday, which should've been up-to-date. Anyway, the latest binaries work with helix and vscodium is also working now. Sorry for the false alarm.

By the time my workshop starts, Rust 1.81 should be released and with it a version of rust-analyzer that includes that patch, hopefully.

@senekor senekor closed this as completed Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants