I could imagine that it’s possible to do this. if you look at repr($ ... $) you can see that you have all the information that you’d need available – but the code to do it likely wouldn’t be pretty. Here’s an example of a smaller syntactical feature that I did:
… and the transformation necessary for bra-ket syntax would be more complex.
I can’t implement this right now, but maybe either you’re inspired by that other post, or someone else is motivated