From: Danny Freeman <danny@dfreeman.email>
To: Yuan Fu <casouri@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Treesitter query question, matching only substring of a node
Date: Mon, 05 Dec 2022 10:25:46 -0500 [thread overview]
Message-ID: <87o7sheure.fsf@dfreeman.email> (raw)
In-Reply-To: <DE19C880-C28F-44D8-B424-393029522B09@gmail.com>
Yuan Fu <casouri@gmail.com> writes:
> I suggest capturing the whole node and using a function to fontify the symbol. With a function you
> can do anything you want, including applying different faces to substrings. To do that, simply
> define a function and use the function name as the capture name.
>
> You can have a look at c-ts-mode--fontify-variable for a simple example.
This is exactly what I was looking for. I can't believe I didn't think
of this when I was reading the documentation.
Thank you for your help!
--
Danny Freeman
next prev parent reply other threads:[~2022-12-05 15:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-04 18:27 Treesitter query question, matching only substring of a node Danny Freeman
2022-12-05 4:05 ` Yuan Fu
2022-12-05 15:25 ` Danny Freeman [this message]
2022-12-05 20:45 ` Yuan Fu
2022-12-06 15:13 ` Danny Freeman
2022-12-08 0:52 ` Yuan Fu
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=87o7sheure.fsf@dfreeman.email \
--to=danny@dfreeman.email \
--cc=casouri@gmail.com \
--cc=emacs-devel@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.