Yes by having at least one symbol in it that has the option “this is a power symbol” set. You might want to read all of the following:
- Creating a new symbol library and a new symbol in KiCad 5
- Tutorial: How to make a symbol (KiCad v5.1.x) - #7 by Rene_Poschl especially the section “Creating a custom power port (power symbol or power label)”
- Electrical type of schematic symbol pins (KiCad 4 and KiCad 5)