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: Eli Zaretskii
Subject: bug#67061: [PATCH] Improve syntax highlighting for python-ts-mode
Date: Sat, 09 Dec 2023 09:32:11 +0200

> From: Denis Zubarev <dvzubarev@yandex.ru>
> Cc: "casouri@gmail.com" <casouri@gmail.com>,
>       "67061@debbugs.gnu.org" <67061@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?





reply via email to

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