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

From: Dmitry Gutov <[email-masked]>
Date: Sat, 9 Dec 2023 20:18:22 +0200

On 09/12/2023 02:39, Denis Zubarev wrote:
> assignment feature:
> For all examples,
> `for var in range(3)`
> `var1[ii] = 1; t.var2[jj] = 2`
> `var := 3`
> `var *= 3`
> highlight var as font-lock-variable-name-face

Arguably, the last 2 lines are "variable references" rather than 
definitions (so font-lock-variable-use-face might make more sense), 
since such operators imply that a variable has already been defined 
previously.

And python--treesit-fontify-variable (in the 'variable' feature) already 
applies that face.

The first example, however, should indeed use font-lock-variable-name-face.