bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60882: 30.0.50; enabling c-ts-mode in header files


From: Yuan Fu
Subject: bug#60882: 30.0.50; enabling c-ts-mode in header files
Date: Thu, 19 Jan 2023 13:58:45 -0800

Felix <felix.dick@web.de> writes:

> If i follow the steps described in Yuan's tree-sitter starter guide:
>
> (add-to-list 'major-mode-remap-alist
>            '(c-mode . c-ts-mode)
>            '(c++-mode . c++-ts-mode))
>
> c-ts-mode is enabled if i open .c files, but for .h files it's still
> c-mode.
> I checked this with the -Q command line option.
> Thanks

You need to also remap c-or-c++-mode to c-or-c++-ts-mode, which is used
for headers (because C and C++ both can use .h for header files).

Yuan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]