Skip to content
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

tree-sitter independent bracket matching #3584

Closed
sohnryang opened this issue Aug 28, 2022 · 3 comments
Closed

tree-sitter independent bracket matching #3584

sohnryang opened this issue Aug 28, 2022 · 3 comments
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@sohnryang
Copy link
Contributor

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.

@sohnryang sohnryang added the C-enhancement Category: Improvements label Aug 28, 2022
@kirawi kirawi added the A-helix-term Area: Helix term improvements label Aug 28, 2022
@Ordoviz
Copy link
Contributor

Ordoviz commented Aug 28, 2022

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.

@alevinval
Copy link
Contributor

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 )

@alevinval
Copy link
Contributor

This issue can now be closed after #4288 was merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

5 participants