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

From: Ergus <[email-masked]>
Date: Fri, 31 Jan 2025 01:20:32 +0100

Hi Yuan:

Another detail.

I just detected that when I call treesit-inspect-node-at-point  I always
get No node at point

However: (treesit-node-at (point)) provides right information.

On Wed, Jan 29, 2025 at 11:27:59PM -0800, Yuan Fu wrote:
>
>
>> 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