mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
fix(rust): indentation in multi-line tuple pattern (#6402)
* fix(rust): indentation in multi-line tuple pattern * test(indent): rust - add test for tuple pattern indent
This commit is contained in:
parent
8f444c9fcb
commit
1b050206e4
2 changed files with 12 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
|||
(tuple_struct_pattern)
|
||||
(tuple_expression)
|
||||
(tuple_type)
|
||||
(tuple_pattern)
|
||||
(match_block)
|
||||
(call_expression)
|
||||
(assignment_expression)
|
||||
|
|
@ -88,6 +89,9 @@
|
|||
(tuple_type
|
||||
")" @indent.end)
|
||||
|
||||
(tuple_pattern
|
||||
")" @indent.end)
|
||||
|
||||
(trait_item
|
||||
body: (declaration_list
|
||||
"}" @indent.end))
|
||||
|
|
|
|||
8
tests/indent/rust/tuple.rs
Normal file
8
tests/indent/rust/tuple.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fn foo() {
|
||||
for (
|
||||
a,
|
||||
b
|
||||
) in c.iter() {
|
||||
// ...
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue