Are you talking about the code that’s shown if you select “Expand Macro”. That could should have syntax coloring. Do you have a full example where it doesn’t?
I mean in the case of using the type created by the macro in my code, not expanding it.
My macro is a peer macro with a suffix name defined on it and creates let’s say MyTypeProtocolWitness but whenever I use that type in my code it doesn’t get the syntax highlighting.
My macro code is still WIP but can be seen on this GitHub repo
But the main bit of code is the macro definition:
@attached(peer, names: suffixed(ProtocolWitness))
public macro ProtocolWitnessable(targetType: TargetType = .struct, attributeNames: [String] = []) = #externalMacro(module: "ProtocolWitnessableMacros", type: "ProtocolWitnessableMacro")
public enum TargetType {
case `struct`
case `class`
}
It’s worth noting I also had this issue before adding arguments to the macro definition