打開 Settings 界面,依次選擇 Editor -> Code Style -> Java,選擇 Code Generation,
取消 Line comment at first column 和 Block comment at first column 的勾選即可,
1、Line comment at first column (行注釋在第一列)
2、Block comment at first column (在第一列阻止注釋)
這里建議勾選上另兩個選項?add space 注釋自動加空格,有利于快捷鍵 Ctrl + / 和 Ctrl + Shift + l 的自動?spaces reformat in comment
另外,選擇 Wrapping and Braces 換行和大括號,
取消 Comment at first column 的勾選,這將有助于使用快捷鍵 Ctrl + Alt + l,全局格式化代碼時,自動調整注釋默認縮進格式