rust-lang / rust-lang/rust-analyzer
Autocomplete cargo doc paths/links to types in doc comment
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
I've opened this same issue in intellij-rust, but figured I'd also open it here since I'm interested in both tools.
Here's the copy pasted issue:
If you write something like the following in a doc comment
/// An error returned by [`RefCell::try_borrow`](struct.RefCell.html#method.try_borrow).
#[stable(feature = "try_borrow", since = "1.13.0")]
pub struct BorrowError {
_private: (),
}
The struct.RefCell.html#method.try_borrow your documentation site will link to the try_borrow method when you click on the RefCell::try_borrow link.
Since the naming convention for pages / links within a cargo doc generated site is consistent - could intellij-rust support autocomplete for these links?
This would make it much easier to write documentation that references other types/methods within your library.
Thanks!
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
Start with the Rust doc-comment example in the issue and compare the requested behavior with the linked intellij-rust issue. The work is done when autocomplete can suggest paths or links to types and methods referenced in cargo doc-style links within documentation comments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100