Follow the below navigation to enable line numbers in Oracle SQL Developer
SQL Developer | Tools | Preference | Code Editor | Line Gutter
Check Show Line Numbers