Refresh generated neovim config
This commit is contained in:
@ -11,3 +11,9 @@ if (cond1) {
|
||||
} else {
|
||||
do_fallback()
|
||||
}
|
||||
|
||||
if (true)
|
||||
console.log('hi')
|
||||
console.log('hi')
|
||||
|
||||
if (true)
|
||||
|
||||
@ -75,6 +75,8 @@ describe("indent JavaScript:", function()
|
||||
{ 9, 2 },
|
||||
{ 12, 2 },
|
||||
{ 13, 0 },
|
||||
{ 16, 0 },
|
||||
{ 19, 2 },
|
||||
} do
|
||||
run:new_line("ecma/if_else.js", { on_line = info[1], text = "hello()", indent = info[2] }, info[3], info[4])
|
||||
end
|
||||
|
||||
@ -7,3 +7,5 @@ function foo(x)
|
||||
1,
|
||||
2)
|
||||
end
|
||||
|
||||
function hi()
|
||||
|
||||
@ -23,6 +23,7 @@ describe("indent Lua:", function()
|
||||
run:new_line("func.lua", { on_line = 4, text = "y = y + 1", indent = 2 })
|
||||
run:new_line("func.lua", { on_line = 5, text = "3,", indent = 4 })
|
||||
run:new_line("func.lua", { on_line = 9, text = "x = x + 1", indent = 0 })
|
||||
run:new_line("func.lua", { on_line = 11, text = "x = x + 1", indent = 2 })
|
||||
run:new_line("string.lua", { on_line = 1, text = "x", indent = 0 })
|
||||
run:new_line("string.lua", { on_line = 2, text = "x", indent = 0 })
|
||||
run:new_line("string.lua", { on_line = 3, text = "x", indent = 2 })
|
||||
|
||||
@ -62,5 +62,10 @@ describe("indent PHP:", function()
|
||||
run:new_line("issue-4848.php", { on_line = 64, text = "return $a;", indent = 12 })
|
||||
run:new_line("issue-4848.php", { on_line = 65, text = "$a,", indent = 8 })
|
||||
run:new_line("issue-4848.php", { on_line = 66, text = "$a;", indent = 0 })
|
||||
run:new_line("issue-6888.php", { on_line = 2, text = "$a;", indent = 0 })
|
||||
run:new_line("issue-6888.php", { on_line = 3, text = "case Funday = 2;", indent = 4 })
|
||||
run:new_line("issue-6888.php", { on_line = 6, text = "$a;", indent = 0 })
|
||||
run:new_line("issue-6888.php", { on_line = 8, text = "$a;", indent = 4 })
|
||||
run:new_line("issue-6888.php", { on_line = 11, text = "$a;", indent = 0 })
|
||||
end)
|
||||
end)
|
||||
|
||||
@ -2,6 +2,12 @@ def aligned_indent(arg1,
|
||||
arg2):
|
||||
pass
|
||||
|
||||
def aligned_indent2(
|
||||
arg1,
|
||||
arg2
|
||||
):
|
||||
pass
|
||||
|
||||
aligned_indent(1,
|
||||
2)
|
||||
|
||||
@ -10,5 +16,10 @@ aligned_indent(1,
|
||||
2
|
||||
)
|
||||
|
||||
aligned_indent(
|
||||
1,
|
||||
2
|
||||
)
|
||||
|
||||
foodsadsa(sdada,
|
||||
2
|
||||
|
||||
@ -38,4 +38,13 @@
|
||||
"toplevel"
|
||||
"list"
|
||||
] @variable
|
||||
|
||||
[
|
||||
(parent
|
||||
(child))+
|
||||
(parent
|
||||
(child))*
|
||||
(parent
|
||||
(child))?
|
||||
] @cap
|
||||
((
|
||||
|
||||
@ -20,6 +20,9 @@ describe("indent Query:", function()
|
||||
run:new_line("test.scm", { on_line = 34, text = '"more"', indent = 2 })
|
||||
run:new_line("test.scm", { on_line = 35, text = "(node)", indent = 0 })
|
||||
run:new_line("test.scm", { on_line = 40, text = "(node)", indent = 0 })
|
||||
run:new_line("test.scm", { on_line = 41, text = "node_name", indent = 2 })
|
||||
run:new_line("test.scm", { on_line = 44, text = "(node)", indent = 2 })
|
||||
run:new_line("test.scm", { on_line = 46, text = "(node)", indent = 2 })
|
||||
run:new_line("test.scm", { on_line = 48, text = "(node)", indent = 2 })
|
||||
run:new_line("test.scm", { on_line = 50, text = "node_name", indent = 2 })
|
||||
end)
|
||||
end)
|
||||
|
||||
@ -10,9 +10,7 @@ local run = Runner:new(it, "tests/indent/r", {
|
||||
|
||||
describe("indent R:", function()
|
||||
describe("whole file:", function()
|
||||
run:whole_file(".", {
|
||||
expected_failures = {},
|
||||
})
|
||||
run:whole_file(".", {})
|
||||
end)
|
||||
|
||||
describe("new line:", function()
|
||||
@ -37,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)
|
||||
|
||||
@ -5,7 +5,6 @@ init <- 1
|
||||
|
||||
r"{(\1\2)}" -> `%r%`
|
||||
# ^ @string
|
||||
# ^ @string.escape
|
||||
# ^ @operator
|
||||
# ^ @variable
|
||||
|
||||
@ -38,8 +37,9 @@ add <- function(a, b = 1, ...) {
|
||||
# ^ @keyword.function
|
||||
# ^ @variable.parameter
|
||||
# ^ @variable.parameter
|
||||
# ^ @keyword
|
||||
# ^ @constant.builtin
|
||||
return(a + b)
|
||||
# ^ @keyword.return
|
||||
}
|
||||
|
||||
base::letters
|
||||
|
||||
Reference in New Issue
Block a user