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

From: Yuan Fu <[email-masked]>
Date: Mon, 12 Dec 2022 14:54:32 -0800

Jostein Kjønigsen <[email-masked]> writes:

> Open a python buffer, activate python-ts-mode and write a simple statement invoking a function. Example code:
>
>  def somefunc(val)
>      return val
>
>  result = someFunc("123");
>
> Observe how function-name is fontified as function name in the function definition, but not when invoked.
>
> This is inconsistent with how other major-modes fontify function
> names.

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. Other tree-sitter major modes doesn’t
have "definition" and enable "function" by default, I think.

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