I use atom with atom-beautify and uncrustify to format my java files. I want the indentation of the lambda expression to only be indented one level after the open brace, () -> { . I tried indent_continue property, but it goes crazy when I set it to zero. (using 4 spaces for indentation)
when indent_continue = 0 , this happens:
public class Test { public static void runTest(Runnable code) { code.run(); } public static void main(String[] args) { runTest(() -> { System.out.println("hello");
when indent_continue = 4 , these are double indents:
public class Test { public static void runTest(Runnable code) { code.run(); } public static void main(String[] args) { runTest(() -> { System.out.println("hello");
Desired Result:
public class Test { public static void runTest(Runnable code) { code.run(); } public static void main(String[] args) { runTest(() -> { System.out.println("hello");
Current uncrustify.cfg
# -------------------------------------------------------------------------------------------------
Version Information:
Ubuntu 16.04.1 LTS Atom : 1.13.0 Electron: 1.3.13 Chrome : 52.0.2743.82 Node : 6.5.0 uncrustify: 0.59 atom-beautify: 0.29.17
java atom-editor uncrustify
DavidC
source share