rust-lang / rust-lang/rust-analyzer

Show rustdoc of proc macros

Open
#14,772 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-ide C-bug
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

Thank you for rust-analyzer.

  • Please, consider showing rustdoc of attribute macros (on mouse over in VS Code...).
  • And, if you do choose to implement it, please also carry rustdoc if a macro is imported through use ... as ...; under an alias.

Example: Attribute macros aliased on purpose from https://docs.rs/allow_prefixed/latest/allow_prefixed (or from https://docs.rs/allow_prefixed/latest/allow):

Crrent rust-analyzer version v0.3.1506 in current VS Code:

Version: 1.78.1
Commit: 6a995c4f4cc2ced6e3237749973982e751cb0bf9
Date: 2023-05-04T09:46:23.602Z
Electron: 22.5.1
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 6.3.0-1-MANJARO
Sandboxed: No

Thank you in advance.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the attribute-macro example from allow_prefixed, using its Cargo.toml and src/lib.rs, in the reported VS Code and rust-analyzer setup. Trace the hover or rustdoc behavior for the macro and its use ... as ... alias; done means both direct and aliased attribute macros show their rustdoc.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.