Indentation of line comments’ slashes
For those who are looking on how to do this for Scala, the Line comment at first column
configuration is in File > Settings > Editor > Code Style > Scala > Other
tab instead of Code Generation
as with the accepted answer
You can setup in Code Generation:
Go to File > Settings > Editor > Code Style > Java > Code Generation
and uncheck the option "Line comment at first column".
Update Oct 2016 from @henrebotha in the comments:
As of now, there's an additional option just beneath it that says "Add a space at comment start", so this is now supported.
In more recent versions the setting is called:
Comment at first column
Just search for it in the settings window, then go to Editor -> Code Style -> Your language
.