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
View this message in rfc822 format
Jostein Kjønigsen <jostein <at> secure.kjonigsen.net> writes:
> 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.
Yes, you are exactly right. My point is that the change belongs to
"function" feature and not definition. I made a change that added your
rules to a new "function" feature.
>> 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 sure a lot of people would prefer that, no doubt. The other modes
currently having them on level 3 is something we should fix (unless we
end up deciding that we want "function" feature on level 3).
>> 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 :)
Yes, I understand, I’m not against adding this in any way.
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.