Skip to content

Allow proc macros to expose their grammar to rust analyzer for syntax error understanding #7402

@lahwran

Description

@lahwran

My understanding of rust-analyzer - correct me if I'm wrong - is that it can partially analyze code with syntax errors as long as it doesn't use proc macros, and that this is core functionality as part of providing completions for partially written lines such as let x = . If that is correct, what would it take for proc macros to expose their grammar to get the same level of support as the rest of rust when code is incomplete? I'm most interested in getting tab completion for identifiers in proc macros, because I have several different proc macros I'd like to use very heavily and don't want to lose completion functionality in them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-completionautocompletionA-macromacro expansionA-proc-macroproc macroC-ArchitectureBig architectural things which we need to figure up-front (or suggestions for rewrites :0) )S-unactionableIssue requires feedback, design decisions or is blocked on other work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions