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


Message #50 received at 79363 <at> debbugs.gnu.org (full text, mbox):

From: Roi Martin <jroi.martin <at> gmail.com>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 79363 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: Re: bug#79363: 31.0.50; Font locking issue in go-ts-mode when
 tree-sitter grammar is automatically installed
Date: Tue, 09 Sep 2025 10:24:49 +0200
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




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.