From: Alan Mackenzie <acm@muc.de>
To: 61275@debbugs.gnu.org
Subject: bug#61275: c-ts-mode: (eq treesit-font-lock-level 2) doesn't fontify parameter names.
Date: Sat, 4 Feb 2023 16:27:13 +0000 [thread overview]
Message-ID: <Y96HYaHUsS03xpc8@ACM> (raw)
Hello, Emacs.
In master (or probably the release branch), setting
treesit-font-lock-level to 2 for c-ts-mode fontifies variable
definitions, but not the parameter definitions of a C function.
For example, in
int foo (int bar)
{
int baz;
baz = bar;
return baz;
}
, the definition of bar is not fontified, but that of baz is.
There doesn't appear to be a (documented) way to get something similar to
C Mode's fontification, where the declarations of variables and
parameters were fontified, but not their use.
This is a fontification detail I would very much like to have. In long
straggling C functions, variables are frequently declared in the middle
of the functions, and having the declarations stand out makes it easy to
search for them with the eye. It is less easy if parameters aren't also
fontified.
--
Alan Mackenzie (Nuremberg, Germany).
next reply other threads:[~2023-02-04 16:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-04 16:27 Alan Mackenzie [this message]
2023-02-04 16:57 ` bug#61275: c-ts-mode: (eq treesit-font-lock-level 2) doesn't fontify parameter names Eli Zaretskii
2023-02-04 17:00 ` Alan Mackenzie
2023-02-04 17:13 ` Eli Zaretskii
2023-02-04 17:20 ` Eli Zaretskii
2023-02-04 20:54 ` Dmitry Gutov
2023-02-04 20:59 ` Alan Mackenzie
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=Y96HYaHUsS03xpc8@ACM \
--to=acm@muc.de \
--cc=61275@debbugs.gnu.org \
/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.