Skip to content

LSP issues because of too many errors #2072

@senekor

Description

@senekor

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions