mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -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
|
"(" @format.remove
|
||||||
.
|
.
|
||||||
[
|
[
|
||||||
|
(grouping)
|
||||||
(anonymous_node
|
(anonymous_node
|
||||||
name: (string) .)
|
name: (string) .)
|
||||||
(named_node
|
(named_node
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue