I wear just a sports bra and no underwear at all underneath my gym leggings.
I know this may sound a little odd, but I find this extremely comfortable for squatting, running and pretty much every workout at the gym. Plus I don’t worry about awkward visible underwear lines showing through my leggings