Subject: Re: bug#61655: [Tree sitter] [Feature Request] font-lock function calls, definitions, separately

From: Dmitry Gutov <[email-masked]>
Date: Wed, 22 Feb 2023 23:39:10 +0200

On 22/02/2023 20:07, Jacob Faibussowitsch wrote:
>> What's a "member function"? Is it like a method?
> Yeah, I suppose method is the more general term for it.
> 
>> If people want this distinction, we can add such face. But I'm curious whether some other editors use different colors for these cases.
> I personally do not; I brought it up because it was functionality that the 3rd party package had over stock. I think a good representative list is the one vscode offers:
> 
> https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#standard-token-types-and-modifiers
> 
>> I'm also wondering what face we're supposed to use for "receiver-less" method calls, such as calls to the methods defined in the same class, in e.g. Ruby and Java. Or C++/C#. They don't use ‘this’.
> I don’t think emacs should worry about differentiating these cases. Highlight those tokens as tree-sitter sees them; regular function calls (i.e. `font-lock-function-call-face`). It’s a problem you cannot accurately solve without playing the compiler — with all of the implementation and not to mention performance baggage that comes with it.
> 
>> I also wonder whether we'll need to separate faces for properties: definitions vs. uses. That one we could use to do early, to keep the names uniform, e.g. we'd have:
> This is something (also 3rd party package) lsp-mode supports through their semantic highlighting. They further distinguish between read and writes to variables. But again, they are able to do so because they hook directly into compilers.

Thank you, then I guess we can skip that distinction, at least for now.