GNU bug report logs - #67061
[PATCH] Improve syntax highlighting for python-ts-mode

Previous Next

Package: emacs;

Reported by: Denis Zubarev <dvzubarev <at> yandex.ru>

Date: Sat, 11 Nov 2023 02:23:02 UTC

Severity: normal

Tags: patch

Fixed in version 29.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Yuan Fu <casouri <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Denis Zubarev <dvzubarev <at> yandex.ru>
Cc: dmitry <at> gutov.dev, 67061 <at> debbugs.gnu.org
Subject: bug#67061: [PATCH] Improve syntax highlighting for python-ts-mode
Date: Sun, 10 Dec 2023 02:16:57 -0800

On 12/8/23 11:32 PM, Eli Zaretskii wrote:
>> From: Denis Zubarev <dvzubarev <at> yandex.ru>
>> Cc: "casouri <at> gmail.com" <casouri <at> gmail.com>,
>> 	"67061 <at> debbugs.gnu.org" <67061 <at> debbugs.gnu.org>
>> Date: Sat, 09 Dec 2023 03:39:39 +0300
>>
>> I've moved tests to python-tests.el and added another fixes:
>>   
>> assignment feature:
>> `for var in range(3)` highlight var as font-lock-variable-name-face
>> `var1[ii] = 1; t.var2[jj] = 2` highlight var1, var2 as font-lock-variable-name-face
>>   
>> type feature:
>> support nested optional types up to 3 level deep, for example `tuple[tuple, list[Lvl1 | Lvl2[Lvl3[Lvl3],
>> Lvl2]]]`
>>   
>>   
>> Summary of all changes in the patch:
>>   
>> keyword feature:
>> Add "is not"  to the `python--treesit-keywords` list.
>>   
>> 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
>>   
>> string feature:
>> Fix fontification of strings inside of f-strings interpolation,
>> e.g. for f"beg {'nested'}" - 'nested' was not fontified as string.
>>   
>> function feature:
>> Do not override the face of builtin functions (all, bytes etc.) with
>> the function call face
>>   
>> type feature:
>> Fontify built-ins (dict,list,etc.) as types when they are used in type hints.
>> E.g. def func(v:dict[ list[ tuple[str] ], int | None] | None):
> Thanks.
>
> Yuan, would you please chime in and provide your comments, if any?

This should be the last bug report that I missed. I'll look at this 
tomorrow, promise promise.

Yuan




This bug report was last modified 1 year and 176 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.