There are actual (conceptual :D) plans by NASA to use our own sun as a gravitational lens to achieve just that.
The concept is by Slava Turyshev and titled "Direct Multipixel Imaging and Spectroscopy of an Exoplanet with a Solar Gravitational Lens Mission". I'm only a casualstronomer and don't consider myself qualified to provide further details. Should be easy enough to find though!