You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
11193: feat: Add config to replace specific proc-macros with dummy expanders r=Veykril a=Veykril
With this one can specify proc-macros from crates to expand into their input as a (temporary) workaround for the current completion problems with some of the bigger attribute proc-macros like `async_trait`.
This could've been done by just not expanding these macros, but that would require fiddling with nameres. I felt like this approach was simpler to pull off while also keeping the behaviour of the attributes/proc-macro in that they still expand instead of being dead syntax to us.
Fixes#11052
Usage(`async_trait` as example):
```jsonc
"rust-analyzer.procMacro.dummies": {
"async-trait": [ // crate name(as per its cargo.toml definition, not the dependency name)
"async_trait" // exported proc-macro name
]
},
```
Co-authored-by: Lukas Wirth <[email protected]>
Copy file name to clipboardExpand all lines: editors/code/package.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -880,6 +880,11 @@
880
880
"string"
881
881
]
882
882
},
883
+
"rust-analyzer.procMacro.ignored": {
884
+
"markdownDescription": "These proc-macros will be ignored when trying to expand them.\n\nThis config takes a map of crate names with the exported proc-macro names to ignore as values.",
885
+
"default": {},
886
+
"type": "object"
887
+
},
883
888
"rust-analyzer.runnables.overrideCargo": {
884
889
"markdownDescription": "Command to be executed instead of 'cargo' for runnables.",
0 commit comments