I've recently swapped from the listing package to the minted package for my code listings. When I used lstlistings, I was able to redefine \lst@Key to automatically place labels of the format \lst@label:\arabic{lstnumber} at every line number.
After skimming through the minted and fancyvrb source I have not been able to find a way to do this for the minted package however.
Redefining \theFancyVerbLine seems like the obvious solution, but i don't have access to the minted label there.
Any ideas for how this might be implemented?
\def\theFancyVerbLine{\rmfamily\tiny\arabic{FancyVerbLine}\label{minted:line:\the\value{mintedcount}:\arabic{FancyVerbLine}}}) – samcarter_is_at_topanswers.xyz Oct 14 '22 at 12:50