mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
fix: prevent double indent from pipes
This commit is contained in:
parent
8e569bc4b5
commit
65310b64ee
3 changed files with 4 additions and 2 deletions
|
|
@ -2,8 +2,6 @@
|
|||
(braced_expression)
|
||||
(parenthesized_expression)
|
||||
(call)
|
||||
"special"
|
||||
"|>"
|
||||
"if"
|
||||
"else"
|
||||
"while"
|
||||
|
|
|
|||
2
tests/indent/r/incomplete_pipe.R
Normal file
2
tests/indent/r/incomplete_pipe.R
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
mtcars %>%
|
||||
head() %>%
|
||||
|
|
@ -35,6 +35,8 @@ describe("indent R:", function()
|
|||
run:new_line("pipe.R", { on_line = 1, text = "head(n = 10L) |>", indent = 2 })
|
||||
run:new_line("pipe.R", { on_line = 9, text = "head()", indent = 2 })
|
||||
|
||||
run:new_line("incomplete_pipe.R", { on_line = 2, text = "head %>%", indent = 2 })
|
||||
|
||||
run:new_line("aligned_indent.R", { on_line = 1, text = "z,", indent = 17 })
|
||||
end)
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue