Regenerate nvim config
This commit is contained in:
@ -0,0 +1,7 @@
|
||||
package main
|
||||
|
||||
const (
|
||||
ExampleOne = iota
|
||||
ExampleTwo
|
||||
ExampleThree
|
||||
)
|
||||
@ -0,0 +1,8 @@
|
||||
// https://github.com/nvim-treesitter/nvim-treesitter/issues/2369
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func new_line() {
|
||||
fmt.Println("Hello, World!")
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
// https://github.com/nvim-treesitter/nvim-treesitter/issues/2369
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func goodIndent(param string) {
|
||||
fmt.Println("typing o here works as expected")
|
||||
}
|
||||
|
||||
func badIndent(
|
||||
param string, // this is the difference
|
||||
) {
|
||||
fmt.Println("typing o here triggers bad indent")
|
||||
foo(bar,
|
||||
baz,
|
||||
call,
|
||||
stop,
|
||||
please)
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
func correct(word string) {
|
||||
switch word {
|
||||
|
||||
} // <---
|
||||
select {
|
||||
|
||||
} // <---
|
||||
}
|
||||
|
||||
func test() {
|
||||
cases := []struct {
|
||||
first, second string
|
||||
} {
|
||||
{"Hello", "World"},
|
||||
}
|
||||
|
||||
for range cases {
|
||||
println("random stuff")
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
var (
|
||||
thing = 1
|
||||
thingTwo = 2
|
||||
) // <-- This paren should be at 0 instead of indented
|
||||
|
||||
var (
|
||||
thing = 1
|
||||
thingTwo = 2
|
||||
)
|
||||
|
||||
func main() {
|
||||
// It should be
|
||||
var (
|
||||
thing = 1
|
||||
thingTwo = 2
|
||||
)
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
// issue #4248
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func test(ch byte) {
|
||||
ctx := context.TODO()
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
fmt.Println("indentation")
|
||||
default:
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
// issue #2166
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func test(ch byte) {
|
||||
fmt.Println("hey!")
|
||||
switch ch {
|
||||
case 'l':
|
||||
return
|
||||
}
|
||||
|
||||
var i interface{}
|
||||
switch i.(type) {
|
||||
case int:
|
||||
return
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user