mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
Modified Java indent rules to stop ignoring block comments because javadoc blocks were defaulting to indent 0
This commit is contained in:
parent
bf2493f5e1
commit
e23f5d48be
3 changed files with 7 additions and 1 deletions
|
|
@ -25,4 +25,4 @@
|
|||
")"
|
||||
] @indent_end
|
||||
|
||||
[(block_comment) (line_comment)] @ignore
|
||||
(line_comment) @ignore
|
||||
|
|
|
|||
5
tests/indent/java/javadoc.java
Normal file
5
tests/indent/java/javadoc.java
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
public class Foo {
|
||||
/**
|
||||
*/
|
||||
void foo() {}
|
||||
}
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue