Skip to content

Change Macros to Support Rust Analyzer Autocomplete #95

Open
@jbuckmccready

Description

@jbuckmccready

When using the stream! or try_stream! macros autocomplete with rust analyzer works fine until a yield statement is written, this is due to the macro no longer expanding if there is any invalid rust (but only once a yield statement has been written). See the rust analyzer issue here explaining in more detail how autocomplete fails when macros fail to expand (specifically for this crate's macros): rust-lang/rust-analyzer#12759

I have no experience writing proc macros, I'm wondering is it possible to change the way the proc macros are written to always expand even if there is a yield statement and the Rust code is invalid? This would allow rust analyzer auto complete to function properly in all cases. I tested and noticed the tokio select! macro seems to consistently expand which allows autocomplete to function normally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions