[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59904: 29.0.60; js-ts-mode does not fontify method-call to object-in
From: |
Theodor Thornhill |
Subject: |
bug#59904: 29.0.60; js-ts-mode does not fontify method-call to object-instances using font-lock-function-name |
Date: |
Thu, 08 Dec 2022 16:02:26 +0100 |
Jostein Kjønigsen <jostein@secure.kjonigsen.net> 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