Battery vendors generally recommend you do not keep them on a charger all the time since the charger will keep it at 100% charge, and the longer a battery is at 100% charge, the more degradation it will experience for electro-chemical reasons. Sooner or later, that can lead to battery swelling and eventually a catastrophic thermal runoff.
Additionally, keeping a laptop shut and running usually messes with its thermal design as the heat can't escape to the top via the keyboard, further heating up the battery.