Provide an option to exclude particular proc macros expansion #11052
Labels
A-config
configuration
A-macro
macro expansion
Broken Window
Bugs / technical debt to be addressed immediately
S-actionable
Someone could pick this issue up and work on it right now
Uh oh!
There was an error while loading. Please reload this page.
As for now, the expansion of proc macros works good enough, however, not always. For example, if we are modifying the code that is fed to a proc macro the user experience is very poor. The main use case is writing code under
#[async_trait]
. The default behavior where#[async_trait]
isn't expanded and analyzed is much smoother: we don't see the code highlighting broken. So the general IDE experience is way better when#[async_trait]
isn't expanded by rust-analyzer's logic.I propose to add configuration knobs to rust-analyzer that specify the list of macros that the user explicitly doesn't want for the IDE to ever expand.
Another potential use case that we can imagine is excluding special macros that do some expensive I/O or CPU-intensive work and they are not important for the general IDE experience, so we would like rust-analyzer to ignore them.
The text was updated successfully, but these errors were encountered: