mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
fix(yuck): comment out start-of-line parens
This commit is contained in:
parent
2b6020247d
commit
1c72e797ba
3 changed files with 44 additions and 16 deletions
|
|
@ -15,23 +15,15 @@
|
|||
")"
|
||||
"}"
|
||||
"]"
|
||||
] @indent.end
|
||||
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
] @indent.branch
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
] @indent.branch
|
||||
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
] @indent.branch
|
||||
] @indent.end @indent.branch
|
||||
|
||||
; I do not know what/when this should be added.
|
||||
; Commenting this out for now
|
||||
; [
|
||||
; "("
|
||||
; "{"
|
||||
; "["
|
||||
; ] @indent.branch
|
||||
[
|
||||
(ERROR)
|
||||
(comment)
|
||||
|
|
|
|||
17
tests/indent/yuck/indent.yuck
Normal file
17
tests/indent/yuck/indent.yuck
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
(defwidget name
|
||||
:widget parameter
|
||||
(box one
|
||||
:box1 parameter
|
||||
(box two
|
||||
:box2 parameter
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget name
|
||||
:widget parameter
|
||||
(box one
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget name
|
||||
19
tests/indent/yuck_spec.lua
Normal file
19
tests/indent/yuck_spec.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
local Runner = require("tests.indent.common").Runner
|
||||
local run = Runner:new(it, "tests/indent/yuck", {
|
||||
tabstop = 2,
|
||||
shiftwidth = 2,
|
||||
expandtab = true,
|
||||
})
|
||||
|
||||
describe("indent yuck", function()
|
||||
describe("whole file:", function()
|
||||
run:whole_file(".", {
|
||||
expected_failures = {},
|
||||
})
|
||||
end)
|
||||
|
||||
describe("new line:", function()
|
||||
run:new_line("indent.yuck", { on_line = 13, text = ":box1 parameter", indent = 4 })
|
||||
run:new_line("indent.yuck", { on_line = 17, text = ")", indent = 0 })
|
||||
end)
|
||||
end)
|
||||
Loading…
Add table
Add a link
Reference in a new issue