rust-lang / rust-lang/rust-analyzer
"Open Cargo.toml" does not do anything in specific scenario
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source file, test, or entry point. Reproduce the documented VS Code sequence, then locate the Rust Analyzer: Open Cargo.toml command and decide whether its behavior should be fixed or the command removed; done means the command reliably opens Cargo.toml or no longer appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100