aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/go/highlights.scm
diff options
context:
space:
mode:
authorDaniel Martí2023-04-25 23:05:23 +0000
committerGitHub2023-04-25 23:05:23 +0000
commite7f25d88ca059ba006525bd7d476da9ada5341b6 (patch)
treea83cfc8fd53c76198656da5e0882c7e6ad07fd7d /runtime/queries/go/highlights.scm
parent096ed0ced449ff0355fed6220c762c4f7f28ec25 (diff)
Avoid extra indentation on Go switches (#6817)
Unlike other languages, in Go, switches themselves are not indented; it's just each case body which is indented by one level: switch foo { case "bar": baz() } As such, we shouldn't `@indent` for type_switch_statement nor expression_switch_statement, as otherwise inserted lines show up as: switch foo { // inserted with "o" case "bar": // inserted with "o" baz() } With the fix, the inserted lines are indented properly: switch foo { // inserted with "o" case "bar": // inserted with "o" baz() } I also verified that indentation on selects similarly works well. Thanks to Triton171 for helping with this fix.
Diffstat (limited to 'runtime/queries/go/highlights.scm')
0 files changed, 0 insertions, 0 deletions