The precedence of LongRightArrow is predetermined as shown in the operator table.operator table. You can attempt to circumvent the problem as other answers show but these do not change the binding power of the operator itself.
As you can see from the table Part
has especially high binding power. What you want therefore goes against the design of Mathematica in some way; one would expect obj⟶(a[[1]])
rather than (obj⟶a)[[1]]
.
If you want to supersede Part
you might consider something with natively higher binding power though there aren't many choices; Overscript
is one:
Overscript[obj_, property_] := obj[ToString[property]];
Now entered using Ctrl+7:
Manually parenthesizing i.e. actually writing (obj⟶a)[[1]]
is another option:
(obj⟶a)[[1]]
2
Note: you do not need to Unprotect
Overscript
or LongRightArrow
as these operators are intended for use.