Subject: Re: bug#59977: 29.0.60; python-ts-mode does not fontify function-invocations using font-lock-function-name [PATCH]

From: Jostein Kjønigsen <[email-masked]>
Date: Thu, 15 Dec 2022 15:07:04 +0100

On 12.12.2022 23:54, Yuan Fu wrote:
> Ah, yes. That’s because the "definition" feature, which is by enabled by
> default, only highlights definition and ignores invocation. OTOH, the
> "function" feature highlights every instance of a function identifier,
> but it isn’t enabled by default.

I've tried latest python-ts-mode from latest emacs-29 branch, with 
fontification set to level 4 and I can still reproduce this error.

Looking at the code, I cannot see any "function" feature defined, and to 
me it seems a patch like the one I added is required to introduce this 
functionality.

> Other tree-sitter major modes doesn’t
> have "definition" and enable "function" by default, I think.

I believe this is standard for js-ts-mode, typescript-ts-mode, 
tsx-ts-mode and csharp-ts-mode. Even on level 3, and if it wasn't, as a 
user of those languages, I would argue in support of having it there :)

I can't "speak" on behalf of the other major-modes though.

> I’m planning to standardize the features in each major mode according to
> the list I showed you earlier. It’d be great if you can have a look at
> that list and see if you have any opinions, before we decide on the
> final form of it and start to standardize those features in major modes.
> (Of course, each language is different, the standard feature list is
> just a base upon which major modes will extend/modify.)
>
> Yuan
I guess that is another discussion entirely (how to implement a given 
set of features).

This bug is about a feature (function-call highlighting)  being fully 
missing :)

--
Jostein