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

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

bug#61655: [Tree sitter] [Feature Request] font-lock function calls, def


From: Dmitry Gutov
Subject: bug#61655: [Tree sitter] [Feature Request] font-lock function calls, definitions, separately
Date: Fri, 24 Feb 2023 04:31:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

On 23/02/2023 20:15, Eli Zaretskii wrote:
Cc:61655@debbugs.gnu.org
Date: Wed, 22 Feb 2023 23:38:04 +0200
From: Dmitry Gutov<dgutov@yandex.ru>

On 22/02/2023 22:45, Yuan Fu wrote:
Yeah that’s just an idea, and I don’t have problem adding faces. But we 
probably can’t keep adding more and more specific faces. At one point we’ll 
need to either add indirection, or ask users to just add their own 
fontification rules, if it is really specific. We’ll see.
An indirection seems like a separate new feature. Might be useful for
some, but probably unnecessary for this discussion.

Function definition & call is totally reasonable. But adapting all the major 
modes to use them is might be too big a change for emacs-29.
The change itself should be very straightforward. If we agree on the set
of faces (for variables and properties as well, right?), I don't mind
posting a patch for review.

Whether it gets accepted or not.
I'm okay with adding a few more faces to emacs-29, but please hurry,
as we don't have too much time for more additions.

Here's the patch which adds the faces and their uses in all ts modes.

Comments welcome from all the interested parties. The patch is mostly straightforward, but there are some changes added as well, where it was needed to differentiate between declarations and references.

The important question here, I think, is whether we want to split font-lock-property-faces in two, like I did here.

By analogy with the other faces, I think it's going to be useful to differentiate between property definitions and property references. Not many of the languages modes used font-lock-property-face for property/attribute definitions, but some did.

Attachment: font-lock-more-finer-faces.diff
Description: Text Data


reply via email to

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