Indeed.
And yes, there do exist energy based non-lance weapons, but they are rare (typically mounted on Adeptus Mechanicus ships who can experiment with the weird stuff, or lost archaeotech ships), and usually shorter-ranged. The exceptions are xeno-tech weapons (Eldar use energy weapon batteries instead of projectiles), but that wouldn't be found on Imperial Navy line vessels.
Ships with lance-only or lance-heavy armament aren't typically standard line vessels either. They're purpose designed that way, to move in concert with other ships carrying a heavy or pure projectile armament.