The new version of Windows Powertoys includes support for previewing GCode files (and PDFs and many more) in the preview pane of the File Explorer (there’s a setting to turn it on).
There’s heaps of other utilities with it as well
You can get it here Release Release v0.70.0 · microsoft/PowerToys (github.com)
It’s all open source, and on an MIT licence if you feel like hacking anything around yourself.