Skip to content

Feature Request: VSCode command to trigger cargo check #12870

Closed
@rongcuid

Description

@rongcuid

I want to trigger cargo check in rust-analyzer manually, via a command, instead of on save.

Scenario 1:

  • I have a large project, of which cargo check takes minutes to perform
  • I don't want cargo check be run on every save. Therefore, I disable running checks on save
  • When it does run, however, I want rust-analyzer diagnosis be updated

Scenario 2:

  • I run cargo fmt or cargo clippy on the terminal
  • Rust-analyzer does not rerun checks. Currently I have to save a file to trigger

Workaround:

  • Right now, I have to restart rust-analyzer every time I want to refresh the diagnosis

Possible solution:

It should be easy. Just copying existing functionality (on save) out to the commands.

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