-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect bracket matching and broken syntax highlighting with this chunk of C code #5177
Comments
The highlighting and bracket matching breaks because tree-sitter-c fails to parse it successfully. You can see the error nodes in this run of |
Makes sense. That repository seems largely unmaintained, unfortunate! I will have to look into fixing it myself if I want this then. Thanks for the link |
I'm seeing this in Python. The incorrectness can be seen right from the highlighted matched bracket. wrong_matching_brackets.mov |
Summary
Typing
mm
to go to matching bracket on the top bracket goes to the wrong one, and fiddeling with the file changing the grammar of things (e.gtransform_scope
=>transform_scope()
) fixes it. So does removing any line inside of thepipeline_scope
.When the highlighting on the outermost scope is colored blue as in the first screenshot:
That means it's broken as seen in the incorrectly highlighted bracket, and when it's green that means it's working as shown below:
Reproduction Steps
Open helix and paste this buffer of C code into the file, saving it as
tmp.c
or something so it recognizes it as C:Helix log
~/.cache/helix/helix.log
Platform
Windows
Terminal Emulator
Windows Terminal
Helix Version
22.12-47-g4acdc03b
The text was updated successfully, but these errors were encountered: