GNU bug report logs - #79363
31.0.50; Font locking issue in go-ts-mode when tree-sitter grammar is automatically installed

Previous Next

Package: emacs;

Reported by: Roi Martin <jroi.martin <at> gmail.com>

Date: Mon, 1 Sep 2025 21:33:02 UTC

Severity: normal

Found in version 31.0.50

Full log


View this message in rfc822 format

From: Yuan Fu <casouri <at> gmail.com>
To: Roi Martin <jroi.martin <at> gmail.com>
Cc: 79363 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: bug#79363: 31.0.50; Font locking issue in go-ts-mode when tree-sitter grammar is automatically installed
Date: Wed, 10 Sep 2025 00:09:38 -0700

> On Sep 9, 2025, at 1:24 AM, Roi Martin <jroi.martin <at> gmail.com> wrote:
> 
> Yuan Fu <casouri <at> gmail.com> writes:
> 
>> Thanks for the analysis! Does that mean once the grammar is installed,
>> and you restart Emacs, go-ts-mode would work as normal?
> 
> Yes, that is correct.
> 
>> We do need to fix how we’re defining font-lock rules, the test should
>> be done when major mode is enabled, not when the package is loaded. I
>> thought about this problem and wanted to come up with some generic
>> solution, such as letting treesit-font-lock-rules support a predicate
>> function/query for font-lock-rules, or define rules in a fallback
>> list. I didn’t come up with a very satisfying solution and the
>> progress kind of stalled. Anyway, now it seems I need to put some
>> thought into this and come up with something soon.
> 
> After discussing it with Juri, I've sent a few patches that fix some of
> the affected tree-sitter modes.  You can read the conversation in the
> issue:
> 
>  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79363
> 
> However, I'm working on more patches, so you might want to check the
> ones I've already sent.  Feedback is more than welcome.
> 
> Thanks!
> 
>        Roi

Apologies, apparently I didn’t get any of the messages between you and Juri. I’ve cursed at my mail client and will read the conversation on the archive :-)

Yuan



This bug report was last modified 4 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.