By default, Helix requires that any node captured with @rainbow.bracket must be a direct descendant of a node captured with @rainbow.scope to be highlighted.
If your language structure has intermediate nodes between the scope-changing node and the bracket (common in markup languages like HTML), you must use the rainbow.include-children property to allow indirect descendants to be highlighted.
Example: HTML implementation
In HTML, an (element) node contains (start_tag) and (end_tag) nodes, which in turn contain the bracket characters. To ensure the brackets are colored correctly, apply the property to the (element) scope:
((element) @rainbow.scope
(#set! rainbow.include-children))
((element) @rainbow.scope
(#set! rainbow.include-children))