|
From: | Dmitry Gutov |
Subject: | bug#67061: [PATCH] Improve syntax highlighting for python-ts-mode |
Date: | Mon, 11 Dec 2023 14:02:01 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
On 11/12/2023 09:10, Yuan Fu wrote:
IMHO, for the assignment feature, we should stick to the narrow definition of assignments, ie, anything that looks like "a = b". Things like "for var in range(3)" could be highlighted by variable feature, I think.I wanted shorthand form to be consistent with the full form. Your point makes sense too, I don't have strong opinion about this.Also I'm not sure now about `var[ii] = 1`, since it is actually accessing the list or dictionary element and `font-lock-variable-use-face` may suit better here.Yep. To sum up, I would add highlighting to your examples `for var in range(3)` and `var := 3` but not others.
I think "for var in range(3)" should be part of the "definition" feature because a variable is defined there. Alongside parameters.
[Prev in Thread] | Current Thread | [Next in Thread] |