rust-lang / rust-lang/rust-analyzer
[feature request] more ide features (hover, goto definition, completion/fly-imports, etc...) in documentation code snippets.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer already provides highlighting in these code snippets in documentation:

I think that it would be really awesome if we could also provide some IDE features in these snippets, namely hover, inlay hints, goto defintion and autocomplete/flyimports, rename, and maybe even diagnostics (perhaps diagnostics/inlay hints should only be active while your cursor is within the doc snippet to not be annoying outside of editing the snippet). It would make writing documentation examples much much easier and delightful too.
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 by examining the existing highlighting provided by rust-analyzer in documentation code snippets. Define which requested IDE features—hover, inlay hints, goto definition, autocomplete or fly-imports, rename, and diagnostics—are in scope, then verify that the selected features work in those snippets without making diagnostics or inlay hints distracting outside the snippet.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience, documentation, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100