GNU bug report logs -
#59977
29.0.60; python-ts-mode does not fontify function-invocations using font-lock-function-name [PATCH]
Previous Next
Reported by: jostein <at> kjonigsen.net
Date: Sun, 11 Dec 2022 20:28:01 UTC
Severity: minor
Tags: patch
Fixed in version 29.0.60
Done: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 59977 <at> debbugs.gnu.org (full text, mbox):
Jostein Kjønigsen <jostein <at> 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
This bug report was last modified 2 years and 202 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.