bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Dmitry Gutov
Subject: bug#67061: [PATCH] Improve syntax highlighting for python-ts-mode
Date: Sat, 9 Dec 2023 20:18:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]