Closed NathanLovato closed 3 months ago
Isn't this the same as #10 ? It was supposed to be fixed in #15
It seems to be the same thing, in which case the pull request did not fix the issue. It might have been tested a little too quickly, not finding all edge cases. I don't see how the Python implementation works or would provide full indent support. I'm just learning tree sitter queries, but this code, to my understanding, only supports brackets:
(_ "[" "]" @end) @indent
(_ "{" "}" @end) @indent
(_ "(" ")" @end) @indent
What I understand from it is "indent anytime you encounter a closed pair of square, angular brackets, or parentheses, after anything. If this is correct, these rules, it'd be normal that no indent gets added after starting a block: there'd be no rule for that.
I reverted that PR and indentation seem to work only when there is no :
at the end of the line, interesting.
Here's a video demonstrating this:
https://github.com/user-attachments/assets/ffc6584e-c918-40fc-97e0-199db626d91f