mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
fix: formatter idempotency for nested groupings (#7345)
Currently, for something like `(((((node))))) @cap`, the formatter will produce `((node)) @cap`, and then after another pass it will produce `(node) @cap`. This commit makes it so that all extraneous parentheses are removed on the first pass.
This commit is contained in:
parent
8e40904e49
commit
a069bb62a8
1 changed files with 1 additions and 0 deletions
|
|
@ -248,6 +248,7 @@ local format_queries = [[
|
|||
"(" @format.remove
|
||||
.
|
||||
[
|
||||
(grouping)
|
||||
(anonymous_node
|
||||
name: (string) .)
|
||||
(named_node
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue