GNU bug report logs - #64830
29.1; C++ treesitter mode no coloration

Previous Next

Package: emacs;

Reported by: David Come <david.come <at> ageagle.com>

Date: Mon, 24 Jul 2023 10:34:01 UTC

Severity: normal

Merged with 64818

Found in versions 29.1, 30.0.50

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 64830 <at> debbugs.gnu.org, casouri <at> gmail.com
Subject: Re: bug#64830: 30.0.50 C++ treesitter mode no coloration
Date: Sun, 25 Aug 2024 07:54:43 +0300
> Date: Sun, 25 Aug 2024 02:19:28 +0000
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 64830 <at> debbugs.gnu.org
> From: Alan Mackenzie <acm <at> muc.de>
> 
> I've now applied your patch, the one whose first hunk's header is:
> 
> @@ -537,6 +537,16 @@ c-ts-mode--top-level-label-matcher
> 
> , but it unfortunately doesn't solve the bug.  On templates-21.cc, one of
> the test files from CC Mode, on doing M-x c++-ts-mode, there is no
> fontification at all.  In *Messages* we have
> 
> Error during redisplay: (jit-lock-function 1) signaled
> (treesit-query-error "Node type error at" 677 "[\"_Atomic\" \"break\"
> \"case\" \"const\" \"continue\" \"default\" \"do\" \"else\" \"enum\"
> \"extern\" \"for\" \"goto\" \"if\" \"inline\" \"register\" \"restrict\"
> \"return\" \"sizeof\" \"static\" \"struct\" \"switch\" \"typedef\"
> \"union\" \"volatile\" \"while\" \"and\" \"and_eq\" \"bitand\" \"bitor\"
> \"catch\" \"class\" \"co_await\" \"co_return\" \"co_yield\" \"compl\"
> \"concept\" \"consteval\" \"constexpr\" \"constinit\" \"decltype\"
> \"delete\" \"explicit\" \"final\" \"friend\" \"mutable\" \"namespace\"
> \"new\" \"noexcept\" \"not\" \"not_eq\" \"operator\" \"or\" \"or_eq\"
> \"override\" \"private\" \"protected\" \"public\" \"requires\"
> \"template\" \"throw\" \"try\" \"typename\" \"using\" \"xor\" \"xor_eq\"]
> @font-lock-keyword-face (auto) @font-lock-keyword-face (this)
> @font-lock-keyword-face (virtual) @font-lock-keyword-face" "Debug the
> query with `treesit-query-validate'")
> 
> That "Node type error at" 677 isn't a buffer position - the buffer is
> only 325 characters long.
> 
> Is there anything else I could do to help, here?

AFAIR, you still didn't respond to my questions about the version of
the C++ grammar library you are using, nor tried to upgrade to the
latest version of that grammar library.

FTR, I'm using tree-sitter version 0.20.8 and grammar library from
their Git repository as of June 17 (this is version 0.22.2 of the
grammar library with a couple of changes after that version).  I have
no problems with displaying C++ files whatsoever, and *Messages* is
clean.  I also tried the latest version of the grammar library
(0.22.3), and didn't see any problems there, either.




This bug report was last modified 254 days ago.

Previous Next


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