Subject: Re: bug#72388: 31.0.50; Use tree-sitter-cuda grammar but with tree-sitter-cpp's font-lock/indentation rules

From: Yuan Fu <[email-masked]>
Date: Wed, 29 Jan 2025 23:27:59 -0800

> On Jan 21, 2025, at 10:23 PM, Ergus <[email-masked]> wrote:
> 
> Hi Yuan:
> 
> When I try your patch I get an error:
> 
> Debugger entered--Lisp error: (treesit-no-parser cpp)
>  (treesit-buffer-root-node cpp)
>  (treesit-node-at 3091)
>  (treesit-show-paren-data--categorize 3091)
>  (treesit-show-paren-data)
>  (show-paren-function)
>  (apply show-paren-function nil)
>  (timer-event-handler [t 0 0 125000 t show-paren-function nil idle 0 nil])
> 
> When I try:
> (treesit-parser-list nil 'cpp) -> nil
> 
> So it it like the
> 
> I tried manually (setq-local treesit-primary-parser
> (treesit-parser-create 'cpp))
> 
> but nothing.

Apologies, the previous change I made is indeed insufficient. Please try the latest master, the remapping should be truly transparent now.

Yuan