mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 03:10:04 -04:00
fix: Java indent for multiple line arguments (#4449)
* fix Java indent for multiple line arguments, fixes #4448, add an additional test for methods with arguments on multiple lines * Satisfy StyLua check --------- Co-authored-by: Daniel Woznicki <danwoz@nettoolkit.com>
This commit is contained in:
parent
980f0816cc
commit
7947a2ccf1
4 changed files with 14 additions and 1 deletions
|
|
@ -2,7 +2,6 @@
|
||||||
(class_body)
|
(class_body)
|
||||||
(enum_body)
|
(enum_body)
|
||||||
(interface_body)
|
(interface_body)
|
||||||
(constructor_declaration)
|
|
||||||
(constructor_body)
|
(constructor_body)
|
||||||
(block)
|
(block)
|
||||||
(switch_block)
|
(switch_block)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
public class Testo {
|
||||||
|
public Testo(
|
||||||
|
String a
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
public class Testo {
|
||||||
|
void hello(
|
||||||
|
String a
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -31,5 +31,7 @@ describe("indent Java:", function()
|
||||||
)
|
)
|
||||||
run:new_line("issue_2583.java", { on_line = 4, text = "int x = 1;", indent = 4 })
|
run:new_line("issue_2583.java", { on_line = 4, text = "int x = 1;", indent = 4 })
|
||||||
run:new_line("method_chaining.java", { on_line = 4, text = '.append("b");', indent = 6 })
|
run:new_line("method_chaining.java", { on_line = 4, text = '.append("b");', indent = 6 })
|
||||||
|
run:new_line("constructor_with_arguments_on_multiple_lines.java", { on_line = 4, text = "}", indent = 2 })
|
||||||
|
run:new_line("method_with_arguments_on_multiple_lines.java", { on_line = 4, text = "}", indent = 2 })
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue