mirror of
https://github.com/nvim-treesitter/nvim-treesitter
synced 2024-09-16 14:34:05 +02: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
|
||||
("("
|
||||
condition: (_)")") @indent.begin)
|
||||
condition: (_)
|
||||
")") @indent.begin)
|
||||
|
||||
[
|
||||
"}"
|
||||
|
|
|
@ -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
|
||||
.
|
||||
|
|
|
@ -227,6 +227,7 @@ local format_queries = [[
|
|||
(list)
|
||||
(predicate)
|
||||
(grouping . (_))
|
||||
(field_definition)
|
||||
"."
|
||||
] @format.append-newline
|
||||
(_) .)
|
||||
|
|
Loading…
Reference in a new issue