google / styleguide

Style guides for Google-originated open-source projects
https://google.github.io/styleguide/
Apache License 2.0
37.32k stars 13.3k forks source link

[IntelliJ] (Add) line comment not start at first column & add space #782

Open tiennm99 opened 1 year ago

tiennm99 commented 1 year ago

By default, IntelliJ add line comment at first column Example, when pressing Ctrl + / at line 3, this file

public class Main {
  public static void main(String[] args) {
    System.out.println("Hello world!");
  }
}

becomes

public class Main {
  public static void main(String[] args) {
//    System.out.println("Hello world!");
  }
}

With these configs, that file becomes

public class Main {
  public static void main(String[] args) {
    // System.out.println("Hello world!");
  }
}