Subject: Re: bug#67061: [PATCH] Improve syntax highlighting for python-ts-mode

From: Dmitry Gutov <[email-masked]>
Date: Mon, 1 Jan 2024 19:42:16 +0200

On 23/12/2023 23:45, Denis Zubarev wrote:
> Just adding a rule for highlighting CamelCase identifiers as types would
> lead to many false positives. For example, global variables or an object
> instantiation.

It seems like the convention is to use ALL_CAPITAL for constants and 
CamelCase for classes/constructors. Those can be distinguished with a 
regexp, with single-char names being sorted into constants, which they 
usually are.

I suppose some code could be violating that, but perhaps we should 
remind such authors about that with highlighting as well.

Regarding object instantiation, I'd be happy to see the class name in 
Class(...) instantiation calls highlighted with font-lock-type-face. 
that's more useful that telling the user that they are seeing a function 
call by the means of font-lock-function-call-face.