rust-analyzer: Does not work for attribute proc macros

rust-analyzer does not work for this file:

use serenity::{
    client::*,
    framework::standard::{macros::command, Args, CommandResult},
    model::channel::Message,
};

#[command]
fn clear(ctx: &mut Context, msg: &Message, args: Args) -> CommandResult {
    Ok(())
}

No intellisense, no completion, nothing works. I assume it’s because of command macro?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 18
  • Comments: 33 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Any plans to work on this? Is there anything blocking this?

In short, what needs to be done to get this working is:

Yes, it’s on the roadmap for the next six weeks: #8486

Oh, finally 🎉 🎉

Any plans to work on this? Is there anything blocking this?

Yes, attribute proc macros are not supported.

It’s weird. I have just tried it in VSCode, Vim and Emacs, works nowhere. VSC result: image

Does it work for you (in Code) with a new project?

I use coc-rust-analyzer, but with custom rust-analyzer path.

Most features should still work as if the attribute wasn’t there though.