Modified Java indent rules to stop ignoring block comments because javadoc blocks were defaulting to indent 0

This commit is contained in:
Daniel Woznicki 2022-02-28 14:22:20 -08:00 committed by Stephan Seitz
parent bf2493f5e1
commit e23f5d48be
3 changed files with 7 additions and 1 deletions

View file

@ -25,4 +25,4 @@
")"
] @indent_end
[(block_comment) (line_comment)] @ignore
(line_comment) @ignore

View file

@ -0,0 +1,5 @@
public class Foo {
/**
*/
void foo() {}
}

View file

@ -22,5 +22,6 @@ describe("indent Java:", function()
run:new_line("class_with_annotation.java", { on_line = 2, text = "void foo() {}", indent = 2 })
run:new_line("enum_with_annotation.java", { on_line = 2, text = "THING;", indent = 2 })
run:new_line("interface.java", { on_line = 1, text = "void foo();", indent = 2 })
run:new_line("javadoc.java", { on_line = 2, text = "* Sample javadoc line", indent = 2 })
end)
end)