- Go to File > Settings
- In the dialog, select 'Editor', then the sub-option for 'General', and then the sub-option for 'Appearance'.
- Select 'Show line numbers' as shown below.
- Click Ok.
Source
UPDATE The location for this setting has been changed to Editor -> General -> Appearance.