helix
helix copied to clipboard
tree-sitter independent bracket matching
Describe your feature request
Currently helix editor depends heavily on tree-sitter to provide bracket matching. However, this makes the editor is unable to give correct results when tree-sitter does not have relevant information regarding brackets' placements. (examples are #1108, #2110, #3357 and #3487) Therefore, bracket matching which works regardless of tree-sitter availability is needed.
We need a combination of both: using tree-sitter means that unmatched brackets in comments or strings don't break bracket matching in the whole file, and tree-sitter independent matching is needed for plain text files and comments.
Also, if nothing was matched via tree sitter matching, we could fallback to the tree-sitter independent matching to increase chances of doing what the user expects. ( that could be helpful in cases like people editing YAML, for which there is a tree-sitter grammar, but you may still expect some plain text matching to work )
This issue can now be closed after #4288 was merged