mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
test(go): add cases for newlines de-indentation
test(go): combine new indent test cases test(go): add incorrect indent after var closing ) this case does not work correctly already so add that in since this PR does not address that case test(go): set current lines in indent test test(go): simplify test case
This commit is contained in:
parent
eb0eb67bc5
commit
bca65c068b
2 changed files with 12 additions and 0 deletions
8
tests/indent/go/issue-2369-newline.go
Normal file
8
tests/indent/go/issue-2369-newline.go
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
// https://github.com/nvim-treesitter/nvim-treesitter/issues/2369
|
||||||
|
package main
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
func new_line() {
|
||||||
|
fmt.Println("Hello, World!")
|
||||||
|
}
|
||||||
|
|
@ -18,4 +18,8 @@ describe("indent Go:", function()
|
||||||
describe("new line:", function()
|
describe("new line:", function()
|
||||||
run:new_line("issue-2369.go", { on_line = 13, text = "// some comment", indent = 1 })
|
run:new_line("issue-2369.go", { on_line = 13, text = "// some comment", indent = 1 })
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
describe("new line after )/}:", function()
|
||||||
|
run:new_line("issue-2369-newline.go", { on_line = 8, text = "// comment", indent = 0 })
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue