[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67061: [PATCH] Improve syntax highlighting for python-ts-mode
From: |
Eli Zaretskii |
Subject: |
bug#67061: [PATCH] Improve syntax highlighting for python-ts-mode |
Date: |
Tue, 09 Jan 2024 22:03:33 +0200 |
> Date: Mon, 1 Jan 2024 19:42:16 +0200
> Cc: "67061@debbugs.gnu.org" <67061@debbugs.gnu.org>
> From: Dmitry Gutov <dmitry@gutov.dev>
>
> 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.
Is there anything else left to do here, or should I close this bug?