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
- Merge #9128 9128: feat: expand procedural attribute macros r=jonas-schievink a=jonas-schievink This adds experimental support for attribute macros. They can be enabled by setting `rust-analyzer.expe... — committed to rust-lang/rust-analyzer by bors[bot] 3 years ago
- Merge #9128 9128: feat: expand procedural attribute macros r=jonas-schievink a=jonas-schievink This adds experimental support for attribute macros. They can be enabled by setting `rust-analyzer.expe... — committed to rust-lang/rust-analyzer by bors[bot] 3 years ago
In short, what needs to be done to get this working is:
#![register_{attr,tool}]for nightly users https://github.com/rust-analyzer/rust-analyzer/pull/8900Yes, 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:
Does it work for you (in Code) with a new project?
I use
coc-rust-analyzer, but with customrust-analyzerpath.Most features should still work as if the attribute wasn’t there though.