mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(rust): remove if_let from indent captures
fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/3073
This commit is contained in:
parent
1b6debcf69
commit
8bc4d046e7
3 changed files with 10 additions and 1 deletions
7
tests/indent/rust/if_let_cond.rs
Normal file
7
tests/indent/rust/if_let_cond.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fn foo() -> i32 {
|
||||
if let Some(v) = Some(2) {
|
||||
1
|
||||
} else {
|
||||
2
|
||||
}
|
||||
}
|
||||
|
|
@ -22,6 +22,9 @@ describe("indent Rust:", function()
|
|||
run:new_line("cond.rs", { on_line = 4, text = "x += 1;", indent = 8 })
|
||||
run:new_line("cond.rs", { on_line = 6, text = "x += 1;", indent = 8 })
|
||||
run:new_line("cond.rs", { on_line = 8, text = "x += 1;", indent = 4 })
|
||||
run:new_line("if_let_cond.rs", { on_line = 2, text = "let a = 1;", indent = 8 })
|
||||
run:new_line("if_let_cond.rs", { on_line = 4, text = "let a = 1;", indent = 8 })
|
||||
run:new_line("if_let_cond.rs", { on_line = 6, text = "let a = 1;", indent = 4 })
|
||||
run:new_line("enum.rs", { on_line = 2, text = "Q,", indent = 4 })
|
||||
run:new_line("enum.rs", { on_line = 4, text = "i32,", indent = 8 })
|
||||
run:new_line("enum.rs", { on_line = 8, text = "z: u32,", indent = 8 })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue