mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 09:50:04 -04:00
fix(format): field_def inside grouping
This commit is contained in:
parent
65310b64ee
commit
929e4739cc
3 changed files with 7 additions and 3 deletions
|
|
@ -14,7 +14,8 @@
|
||||||
|
|
||||||
(if_statement
|
(if_statement
|
||||||
("("
|
("("
|
||||||
condition: (_)")") @indent.begin)
|
condition: (_)
|
||||||
|
")") @indent.begin)
|
||||||
|
|
||||||
[
|
[
|
||||||
"}"
|
"}"
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,8 @@
|
||||||
.
|
.
|
||||||
(decl
|
(decl
|
||||||
name: (variable) @variable)
|
name: (variable) @variable)
|
||||||
match: (_)(#eq? @_name @variable))
|
match: (_)
|
||||||
|
(#eq? @_name @variable))
|
||||||
|
|
||||||
; but consider a type that involves 'IO' a decl/function
|
; but consider a type that involves 'IO' a decl/function
|
||||||
(decl/signature
|
(decl/signature
|
||||||
|
|
@ -161,7 +162,8 @@
|
||||||
.
|
.
|
||||||
(decl
|
(decl
|
||||||
name: (variable) @function)
|
name: (variable) @function)
|
||||||
match: (_)(#eq? @_name @function))
|
match: (_)
|
||||||
|
(#eq? @_name @function))
|
||||||
|
|
||||||
((decl/signature) @function
|
((decl/signature) @function
|
||||||
.
|
.
|
||||||
|
|
|
||||||
|
|
@ -227,6 +227,7 @@ local format_queries = [[
|
||||||
(list)
|
(list)
|
||||||
(predicate)
|
(predicate)
|
||||||
(grouping . (_))
|
(grouping . (_))
|
||||||
|
(field_definition)
|
||||||
"."
|
"."
|
||||||
] @format.append-newline
|
] @format.append-newline
|
||||||
(_) .)
|
(_) .)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue