I want comments to be intended when using Ctrl+/, it works for Java but not for Kotlin code, I have done as mentioned in help-desk (Note: I'm using Intellij Ultimate 2018.2)
To configure settings for commenting behavior in Java, use options in the Comment Code section, on the Code Generation tab located in File | Settings/Preferences | Editor | Code Style | Java.
Marked Add a space at comment start in Commented Code section,
I couldn't find any comment code configuration in Kotlin Code Style

For example in Kotlin:
fun main(args: Array<String>) {
// Desired comment
// After Using Ctrl+/
}
But works in Java:
public class Sample {
public static void main(String[] args) {
// Works fine using Ctrl+/
}
}
I'm using IntelliJ IDEA 2018.3, but I believe this is still available in IDEA 2018.2.
In Settings, Editor -> Code Style -> Kotlin -> Wrapping and Braces, under Keep when reformatting, untick Comment at first column.

Update: I found this is not at coding... But take place after Code -> Reformat Code :-(
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With