intellij-ideagroovyreformatting

IDEa puts inline comments onto new line in Groovy files whereas in Java not. Can this be changed?


I cannot find a setting that is causing this. In Groovy file, a line comment after a statement is thrown to a new line once I reformat. In Java file it sticks on the original line. I want it to stick also on groovy files. Is this not configurable?

enter image description here


Solution

  • It's not possible to not wrap end of line comments in Groovy at the moment, it's a limitation of IntelliJ IDEA Groovy formatter, please follow this issue for updates.