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

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

bug#59977: 29.0.60; python-ts-mode does not fontify function-invocations


From: Yuan Fu
Subject: bug#59977: 29.0.60; python-ts-mode does not fontify function-invocations using font-lock-function-name [PATCH]
Date: Mon, 12 Dec 2022 14:54:32 -0800

Jostein Kjønigsen <jostein@secure.kjonigsen.net> 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






reply via email to

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