mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
Fixed a bug where Java enum body indentation was not correct
Added test for Java enum indentation
This commit is contained in:
parent
6fcf9b72ef
commit
1b47af43ce
3 changed files with 7 additions and 0 deletions
|
|
@ -1,6 +1,8 @@
|
|||
[
|
||||
(class_declaration)
|
||||
(class_body)
|
||||
(enum_declaration)
|
||||
(enum_body)
|
||||
(constructor_declaration)
|
||||
(constructor_body)
|
||||
(block)
|
||||
|
|
|
|||
4
tests/indent/java/enum.java
Normal file
4
tests/indent/java/enum.java
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
public enum Foo {
|
||||
THING_A,
|
||||
THING_C;
|
||||
}
|
||||
|
|
@ -18,5 +18,6 @@ describe("indent Java:", function()
|
|||
describe("new line:", function()
|
||||
run:new_line("method.java", { on_line = 1, text = "void foo() {}", indent = 2 })
|
||||
run:new_line("issue_2571.java", { on_line = 5, text = "void bar() {}", indent = 2 })
|
||||
run:new_line("enum.java", { on_line = 2, text = "THING_B,", indent = 2 })
|
||||
end)
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue