bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62333: 30.0.50; Issue with tree-sitter syntax tree during certain ch


From: Dmitry Gutov
Subject: bug#62333: 30.0.50; Issue with tree-sitter syntax tree during certain changes
Date: Sun, 26 Mar 2023 01:29:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

On 25/03/2023 21:31, Yuan Fu wrote:

I don’t think we should blindly widen in tree-sitter sexp functions, but not 
because of mmm-mode—tree-sitter ranges should have that mostly covered. My 
primary concern is that what if narrowing is intended by the caller?

Yes.

But I don’t have any good idea for blink-matching right now.

show-paren-mode has show-paren-data-function (which treesit should also plug into, I think).

Since we're looking for ad-hoc solutions, we could add a similar extension point for blink-matching-paren.

Or even try to reuse show-paren-data-function: just specialize in a limited number of cases - check that (nth 1 data) matches point, and then take the elements 3,4 and perform the existing checks on them. There might be some differences in behavior, but probably nothing some checks using 'syntax-after' couldn't handle.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]