mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(wgsl): indent call expression params (#7309)
This commit is contained in:
parent
b5cda6d731
commit
ea3a37a975
3 changed files with 32 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
(compound_statement)
|
(compound_statement)
|
||||||
(loop_statement)
|
(loop_statement)
|
||||||
(struct_declaration)
|
(struct_declaration)
|
||||||
|
(type_constructor_or_function_call_expression)
|
||||||
] @indent.begin
|
] @indent.begin
|
||||||
|
|
||||||
((parameter_list) @indent.begin
|
((parameter_list) @indent.begin
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fn f() {
|
||||||
|
let a = foo(
|
||||||
|
b,
|
||||||
|
c,
|
||||||
|
);
|
||||||
|
|
||||||
|
let a = Foo(
|
||||||
|
b,
|
||||||
|
c,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -20,5 +20,25 @@ describe("indent WGSL:", function()
|
||||||
run:new_line("basic.wgsl", { on_line = 52, text = "c: u32,", indent = 2 })
|
run:new_line("basic.wgsl", { on_line = 52, text = "c: u32,", indent = 2 })
|
||||||
run:new_line("basic.wgsl", { on_line = 56, text = "c: u32,", indent = 2 })
|
run:new_line("basic.wgsl", { on_line = 56, text = "c: u32,", indent = 2 })
|
||||||
run:new_line("basic.wgsl", { on_line = 59, text = "c: u32,", indent = 2 })
|
run:new_line("basic.wgsl", { on_line = 59, text = "c: u32,", indent = 2 })
|
||||||
|
run:new_line("type_constructor_or_function_call_expression.wgsl", {
|
||||||
|
on_line = 3,
|
||||||
|
text = "b",
|
||||||
|
indent = 4,
|
||||||
|
})
|
||||||
|
run:new_line("type_constructor_or_function_call_expression.wgsl", {
|
||||||
|
on_line = 4,
|
||||||
|
text = "c",
|
||||||
|
indent = 4,
|
||||||
|
})
|
||||||
|
run:new_line("type_constructor_or_function_call_expression.wgsl", {
|
||||||
|
on_line = 8,
|
||||||
|
text = "b",
|
||||||
|
indent = 4,
|
||||||
|
})
|
||||||
|
run:new_line("type_constructor_or_function_call_expression.wgsl", {
|
||||||
|
on_line = 9,
|
||||||
|
text = "c",
|
||||||
|
indent = 4,
|
||||||
|
})
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue