rust-lang / rust-lang/rust-analyzer
Show only the first line of documentation on hover
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Suggestion
Add an option, for example rust-analyzer.hover.documentation.briefOnly, to shrink the displayed documentation in the hover pop-up to just the first line.
My Expirience
Typically, most crates use doc comments to provide full-page documentation about. This includes a lot of useful information, examples, and more. However, popup windows are usually too small to display all that stuff. Therefore, I would prefer to see only the first line of the documentation when I hover over an item. All other information could be accessed from a "Open Documentation" button or smth.
State Of The Art
The rustdoc tutorial suggests writing doc comments in such a way that the first line introduces "a short explaining sentence, what it is". This information should be easily accessible when users hover over the code.
https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html#documenting-components
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 files or tests. Start by locating rust-analyzer's hover documentation rendering and related configuration options, then determine how the first documentation line and a way to access the full text should be represented. Done means the new option produces brief hover documentation while preserving access to the complete documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100