For some reason there's no way to change standard behaviour when the lid is closed in Gnome3 via System Settings. Fortunately it's possible to do in terminal. For this execute the following commands (NOT as root):
$ gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action "<action>"
$ gsettings set org ...