mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -04:00
chore: format with stylua 0.12.0 (#2421)
This commit is contained in:
parent
083aee0873
commit
05c963602b
2 changed files with 71 additions and 52 deletions
|
|
@ -1,3 +1,6 @@
|
||||||
|
column_width = 120
|
||||||
|
line_endings = "Unix"
|
||||||
indent_type = "Spaces"
|
indent_type = "Spaces"
|
||||||
indent_width = 2
|
indent_width = 2
|
||||||
no_call_parentheses = true
|
quote_style = "AutoPreferDouble"
|
||||||
|
call_parentheses = "None"
|
||||||
|
|
|
||||||
|
|
@ -17,78 +17,94 @@ describe("indent JavaScript:", function()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe("new line:", function()
|
describe("new line:", function()
|
||||||
for _, info in ipairs {
|
for _, info in
|
||||||
{ 1, 2 },
|
ipairs {
|
||||||
{ 2, 4 },
|
{ 1, 2 },
|
||||||
{ 3, 4 },
|
{ 2, 4 },
|
||||||
} do
|
{ 3, 4 },
|
||||||
|
}
|
||||||
|
do
|
||||||
run:new_line("ecma/binary_expression.js", { on_line = info[1], text = "//", indent = info[2] }, info[3], info[4])
|
run:new_line("ecma/binary_expression.js", { on_line = info[1], text = "//", indent = info[2] }, info[3], info[4])
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, info in ipairs {
|
for _, info in
|
||||||
{ 4, 2 },
|
ipairs {
|
||||||
{ 6, 0 },
|
{ 4, 2 },
|
||||||
} do
|
{ 6, 0 },
|
||||||
|
}
|
||||||
|
do
|
||||||
run:new_line("ecma/callback.js", { on_line = info[1], text = "//", indent = info[2] }, info[3], info[4])
|
run:new_line("ecma/callback.js", { on_line = info[1], text = "//", indent = info[2] }, info[3], info[4])
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, info in ipairs {
|
for _, info in
|
||||||
{ 2, 2 },
|
ipairs {
|
||||||
{ 5, 2 },
|
{ 2, 2 },
|
||||||
{ 7, 0 },
|
{ 5, 2 },
|
||||||
{ 12, 4 },
|
{ 7, 0 },
|
||||||
{ 18, 2 },
|
{ 12, 4 },
|
||||||
{ 19, 2 },
|
{ 18, 2 },
|
||||||
{ 20, 2 },
|
{ 19, 2 },
|
||||||
{ 25, 2 },
|
{ 20, 2 },
|
||||||
} do
|
{ 25, 2 },
|
||||||
|
}
|
||||||
|
do
|
||||||
run:new_line("ecma/func.js", { on_line = info[1], text = "//", indent = info[2] }, info[3], info[4])
|
run:new_line("ecma/func.js", { on_line = info[1], text = "//", indent = info[2] }, info[3], info[4])
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, info in ipairs {
|
for _, info in
|
||||||
{ 1, 2 },
|
ipairs {
|
||||||
{ 2, 2 },
|
{ 1, 2 },
|
||||||
{ 3, 2 },
|
{ 2, 2 },
|
||||||
{ 5, 4 },
|
{ 3, 2 },
|
||||||
{ 6, 4 },
|
{ 5, 4 },
|
||||||
{ 8, 2 },
|
{ 6, 4 },
|
||||||
{ 9, 2 },
|
{ 8, 2 },
|
||||||
{ 12, 2 },
|
{ 9, 2 },
|
||||||
{ 13, 0 },
|
{ 12, 2 },
|
||||||
} do
|
{ 13, 0 },
|
||||||
|
}
|
||||||
|
do
|
||||||
run:new_line("ecma/if_else.js", { on_line = info[1], text = "hello()", indent = info[2] }, info[3], info[4])
|
run:new_line("ecma/if_else.js", { on_line = info[1], text = "hello()", indent = info[2] }, info[3], info[4])
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, info in ipairs {
|
for _, info in
|
||||||
{ 2, 2 },
|
ipairs {
|
||||||
{ 5, 0 },
|
{ 2, 2 },
|
||||||
} do
|
{ 5, 0 },
|
||||||
|
}
|
||||||
|
do
|
||||||
run:new_line("ecma/object.js", { on_line = info[1], text = "//", indent = info[2] }, info[3], info[4])
|
run:new_line("ecma/object.js", { on_line = info[1], text = "//", indent = info[2] }, info[3], info[4])
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, info in ipairs {
|
for _, info in
|
||||||
{ 3, 6 },
|
ipairs {
|
||||||
{ 4, 6 },
|
{ 3, 6 },
|
||||||
} do
|
{ 4, 6 },
|
||||||
|
}
|
||||||
|
do
|
||||||
run:new_line("ecma/ternary.js", { on_line = info[1], text = "//", indent = info[2] }, info[3], info[4])
|
run:new_line("ecma/ternary.js", { on_line = info[1], text = "//", indent = info[2] }, info[3], info[4])
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, info in ipairs {
|
for _, info in
|
||||||
{ 1, 2 },
|
ipairs {
|
||||||
{ 2, 2 },
|
{ 1, 2 },
|
||||||
{ 3, 2 },
|
{ 2, 2 },
|
||||||
{ 4, 2 },
|
{ 3, 2 },
|
||||||
{ 5, 2 },
|
{ 4, 2 },
|
||||||
{ 6, 2 },
|
{ 5, 2 },
|
||||||
{ 7, 0 },
|
{ 6, 2 },
|
||||||
} do
|
{ 7, 0 },
|
||||||
|
}
|
||||||
|
do
|
||||||
run:new_line("ecma/try_catch.js", { on_line = info[1], text = "hello()", indent = info[2] }, info[3], info[4])
|
run:new_line("ecma/try_catch.js", { on_line = info[1], text = "hello()", indent = info[2] }, info[3], info[4])
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, info in ipairs {
|
for _, info in
|
||||||
{ 1, 2 },
|
ipairs {
|
||||||
{ 2, 0 },
|
{ 1, 2 },
|
||||||
} do
|
{ 2, 0 },
|
||||||
|
}
|
||||||
|
do
|
||||||
run:new_line("ecma/variable.js", { on_line = info[1], text = "hello()", indent = info[2] }, info[3], info[4])
|
run:new_line("ecma/variable.js", { on_line = info[1], text = "hello()", indent = info[2] }, info[3], info[4])
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue