GNU bug report logs -
#66988
30.0.50; treesit-forward-sexp not working properly in js-ts-mode and tsx-ts-mode
Previous Next
Reported by: Loïc Lemaître <loic.lemaitre <at> gmail.com>
Date: Tue, 7 Nov 2023 16:20:01 UTC
Severity: normal
Found in version 30.0.50
Fixed in version 30.1
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #38 received at 66988 <at> debbugs.gnu.org (full text, mbox):
> On Nov 10, 2023, at 11:35 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> Cc: Theodor Thornhill <theo <at> thornhill.no>, 66988 <at> debbugs.gnu.org,
>> Loïc Lemaître <loic.lemaitre <at> gmail.com>
>> From: Yuan Fu <casouri <at> gmail.com>
>> Date: Fri, 10 Nov 2023 18:41:20 -0800
>>
>>> Alternatively, treesit-thing-settings could be interpreted to imply full matches, then the code using it should not only match against the regexps but also check that the entire string (type name) is matched.
>>
>> I regret not doing this by default for treesit-indent-rules and traverse functions. Now it’s hard to change without creating confusion and breaking backward compatibility. I wonder if there are good way to smoothly transition to match full names by default…
>>
>> Treesit-thing-settings can be changed to match full names, but only if we can change treesit-indent-rules and friends too. Otherwise it would be too confusing.
>
> Is it feasible to have a variable that controls whether the full
> matches are implied in these APIs? Then we could start by making it
> optional, and at some later time make it the default.
It’s feasible, but I don’t think it’s TRT. The major mode author should have the control over whether the full match is implied, not the user. It doesn’t make sense to toggle the variable either. If you change that variable, major mode code must also change to be correct.
Yuan
This bug report was last modified 1 year and 127 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.