rust-lang / rust-lang/rust-analyzer

Support for macro arguments

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

Nobody has claimed this yet.

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

Description

I'm using rust-analyzer on Visual Studio Code and I realized while writing macros that there is no support for the macro arguments.
Indeed, there is support for function arguments, but not for the macros.

Function arguments Macro arguments
support for function arguments no support for macro arguments
we can clearly see the function definition, which helps us know what parameters we should pass to the function there is no support to see what are we supposed to write in the macro call

Furthermore, a support for macros with more than one definition would be great too.
macro

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

Reproduce the missing macro-argument support in rust-analyzer through Visual Studio Code, comparing it with the existing function-argument assistance. Trace the relevant macro assistance entry point and determine how multiple macro definitions are represented. Done means macro calls expose their expected arguments and support macros with more than one definition.

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.