-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
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.