fix(folds.ecma): separate folds for if/else/else if

With large if/else/else if blocks, it's difficult to notice that folding
an if statement also folds the else and else if statements along with
them. By allowing the folds of the if, else, and else if statements to
be separate, the folds are easier to distinguish and are more granular.
This commit is contained in:
Peter Cardenas 2025-04-20 20:20:34 -07:00
parent 684eeac91e
commit e0d861b23a
No known key found for this signature in database
GPG key ID: 913B23677E14A03D

View file

@ -22,3 +22,11 @@
(generator_function) (generator_function)
(generator_function_declaration) (generator_function_declaration)
] @fold ] @fold
(if_statement
consequence: (statement_block) @fold
(#offset! @fold 0 0 -1 0))
(if_statement
alternative: (else_clause) @fold
(#offset! @fold 0 0 -1 0))