Edit /etc/systemd/logind.conf :

HandleLidSwitch=ignore

Apply Changes:

# systemctl restart systemd-logind.service

Reference: Arch Linux Wiki