mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-17 17:38:02 +00:00
fix: prevent double indent from pipes
This commit is contained in:
committed by
Christian Clason
parent
8e569bc4b5
commit
65310b64ee
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user