Subject: Re: 29.0.60; js-ts-mode does not fontify method-call to object-instances using font-lock-function-name

From: Theodor Thornhill <[email-masked]>
Date: Thu, 08 Dec 2022 16:02:26 +0100

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

> Looking into the code, a minimal code-repro looks like this:
>
> someObject.someMethod();
>
> Activating treesit-explore-mode on that, yields the following tree:
>
> (expression_statement
>   (call_expression
>    function: (member_expression object: (identifier) . property: 
> (property_identifier))
>    arguments: (arguments ( )))
>   ;)
>
> Now looking in js.el I see the following which looks like it's trying to 
> fontify this, but for some reason it's not working:
>
>       (call_expression
>        function: [(identifier) @font-lock-function-name-face
>                   (member_expression
>                    property:
>                    (property_identifier) @font-lock-function-name-face)])
>
> I'm guessing this fontification is being overridden further down (just 
> like for csharp-ts-mode). From what I can tell, reversing the order of 
> declarations seems to fix this for me.
>

Yeah this is probably correct.  Looks good to me.  Yuan, want to apply?
:-)

Theo