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


Message #38 received at 67061 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Denis Zubarev <dvzubarev <at> yandex.ru>
Cc: dmitry <at> gutov.dev, casouri <at> gmail.com, 67061 <at> debbugs.gnu.org
Subject: Re: bug#67061: [PATCH] Improve syntax highlighting for python-ts-mode
Date: Sat, 09 Dec 2023 09:32:11 +0200
> 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 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.