diff --git a/queries/go/indents.scm b/queries/go/indents.scm index d88329c99..c6ac18969 100644 --- a/queries/go/indents.scm +++ b/queries/go/indents.scm @@ -3,7 +3,6 @@ (const_declaration) (var_declaration) (type_declaration) - (composite_literal) (func_literal) (literal_value) (expression_case) @@ -11,6 +10,7 @@ (block) (call_expression) (parameter_list) + (struct_type) ] @indent [ diff --git a/tests/indent/go/issue-3288.go b/tests/indent/go/issue-3288.go index a59208184..330dd67c5 100644 --- a/tests/indent/go/issue-3288.go +++ b/tests/indent/go/issue-3288.go @@ -7,8 +7,16 @@ func correct(word string) { select { } // <--- - - arr := []struct { - - } // <--- +} + +func test() { + cases := []struct { + first, second string + } { + {"Hello", "World"}, + } + + for range cases { + println("random stuff") + } }