fix(format): field_def inside grouping

This commit is contained in:
再生花 2024-08-01 15:40:23 +09:00 committed by GitHub
parent 65310b64ee
commit 929e4739cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 3 deletions

View file

@ -14,7 +14,8 @@
(if_statement
("("
condition: (_)")") @indent.begin)
condition: (_)
")") @indent.begin)
[
"}"

View file

@ -144,7 +144,8 @@
.
(decl
name: (variable) @variable)
match: (_)(#eq? @_name @variable))
match: (_)
(#eq? @_name @variable))
; but consider a type that involves 'IO' a decl/function
(decl/signature
@ -161,7 +162,8 @@
.
(decl
name: (variable) @function)
match: (_)(#eq? @_name @function))
match: (_)
(#eq? @_name @function))
((decl/signature) @function
.

View file

@ -227,6 +227,7 @@ local format_queries = [[
(list)
(predicate)
(grouping . (_))
(field_definition)
"."
] @format.append-newline
(_) .)