all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: felix.dick@web.de
Cc: 60882@debbugs.gnu.org
Subject: bug#60882: 30.0.50; enabling c-ts-mode in header files
Date: Thu, 19 Jan 2023 13:58:45 -0800	[thread overview]
Message-ID: <9E28D207-7F11-4895-8C91-20B86016322F@gmail.com> (raw)
In-Reply-To: <877cxlgrc3.fsf@web.de>


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	other threads:[~2023-01-19 21:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 14:37 bug#60882: 30.0.50; enabling c-ts-mode in header files Felix
2023-01-19 21:58 ` Yuan Fu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9E28D207-7F11-4895-8C91-20B86016322F@gmail.com \
    --to=casouri@gmail.com \
    --cc=60882@debbugs.gnu.org \
    --cc=felix.dick@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.