mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(ruby): indent of brackets & parens
This commit is contained in:
parent
65a1817ba3
commit
48d88ddbff
4 changed files with 16 additions and 2 deletions
5
tests/indent/ruby/indent-brackets.rb
Normal file
5
tests/indent/ruby/indent-brackets.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
def indent_brackets
|
||||
{
|
||||
{}
|
||||
}
|
||||
end
|
||||
5
tests/indent/ruby/indent-parens.rb
Normal file
5
tests/indent/ruby/indent-parens.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
def indent_parens
|
||||
(
|
||||
()
|
||||
)
|
||||
end
|
||||
|
|
@ -6,6 +6,12 @@ local run = Runner:new(it, "tests/indent/ruby", {
|
|||
})
|
||||
|
||||
describe("indent Ruby:", function()
|
||||
describe("whole file:", function()
|
||||
run:whole_file(".", {
|
||||
expected_failures = {},
|
||||
})
|
||||
end)
|
||||
|
||||
describe("new line:", function()
|
||||
run:new_line("indent-unless.rb", { on_line = 1, text = "stmt", indent = 2 })
|
||||
run:new_line("indent-assignment.rb", { on_line = 1, text = "1 +", indent = 2 })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue