emacs-devel
[Top][All Lists]
Advanced

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

Re: Treesitter query question, matching only substring of a node


From: Danny Freeman
Subject: Re: Treesitter query question, matching only substring of a node
Date: Mon, 05 Dec 2022 10:25:46 -0500

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



reply via email to

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