This PR creates new named nodes for braces wrapping things. This makes them easily captured.
I'm trying to improve indentation for dart in the helix editor. Computing the indent level is based on tree-sitter and on the nodes surrounding the cursor. In order to correctly capture the nodes which should result in indentation, I made some changes to create such nodes.
This PR creates new named nodes for braces wrapping things. This makes them easily captured.
I'm trying to improve indentation for dart in the helix editor. Computing the indent level is based on tree-sitter and on the nodes surrounding the cursor. In order to correctly capture the nodes which should result in indentation, I made some changes to create such nodes.
For example: the
for_statement
was composed ofwith no specific node containing just the parenthesis and the
_for_loop_parts
. Thus I created a new named node. Thefor_statement
becomes:And the new node
for_loop_parts
is simply:I had to adapt the tests to reflect the new nodes.
My work in progress for the queries for indent is here (if useful in any way)