Skip to content

"Open Cargo.toml" does not do anything in specific scenario #9877

@shoffmeister

Description

@shoffmeister

With a specific sequence of steps the "Open Cargo.toml" command of Rust Analyzer can be made to fail:

  • Open any Rust project (directory) with a suitable top-level Cargo.toml file
  • Close all open text editors
  • In vscode Explorer sidebar, single click on the Cargo.toml
    //vscode opens Cargo.toml in a new text editor
  • Click on the (x) on the editor tab to close the editor window
    //editor window closes
    // Cargo.toml still highlighted in blue in Explorer Sidebar
  • Ctrl+Shift+P for vscode command palette
  • "Rust Analyzer: Open Cargo.toml"
    //exp: opens Cargo.toml in editor
    //act: nothing happens

Now, I'd actually suggest that removing the command "Rust Analyzer: Open Cargo.toml" at large is the best way to address this: The ever so handy "Go to file ..." command has auto-completion, so all it takes to get to Cargo.toml is "g f cargo" (or even less depending on completion magic)

Unless "Rust Analyzer: Open Cargo.toml" does more than just "Go to file ... Cargo.toml", I'd propose that it's added value might not be all that great?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-idegeneral IDE featuresC-featureCategory: feature requestE-mediumS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions