Make Distraction Free mode show line numbers in Pycharm/Intellij

Showing the line numbers is independently configurable in distraction-free mode and regular mode.

While in distraction-free mode right-click somewhere close to the left-side of the editor window to see a short menu which contains the Show Line Numbers option:

enter image description here


The accepted answer didn't work for me.

You can always use the shortcut: ctrl + shift + A and type in: "line" and the "show line numbers" option will appear in the list. Navigate to it and press enter to turn it on.