Unmatched parenthesis in singly-quoted string will desperately attempt to match with a regular parenthesis outside said string
Problem
Steps to reproduce
( '(' )) is balanced
vis version (vis -v)
vis v0.9-git +curses +lua +tre +acl +selinux
Terminal name/version
No response
$TERM environment variable
No response
Note: only with single quotes, not double quotes.
Does this come down to "what does the lexer say is a string/comment(?)" or is there something internal that handles it?
The problem is that drawing matching cursors is independent of the syntax and build into the editor core. You can verify this by using a plain text file without any syntax.
The function window_draw_cursor_matching (vis.c:292) responsibly for styling matching symbols, uses text_bracket_match_symbol (text-motions.c:572) internally, which naively searches for bytes in a certain direction.
Maybe the styling of matching symbols should be moved to lua if a syntax is available.
Thanks for the pointer, I'll mess around with this and send a PR if I get it figured out. Do you guys prefer/prioritize PRs on the mailing list, or is here fine?