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: Sun, 17 Dec 2023 23:36:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 17/12/2023 03:07, Yuan Fu wrote:

On Dec 14, 2023, at 3:51 AM, Dmitry Gutov<dmitry@gutov.dev>  wrote:

On 14/12/2023 07:54, Yuan Fu wrote:
I think the 'definition' feature is good for it (going by the name, since it's 
an implicit variable declaration), but it could be split off into a separate 
feature too.
As long as it’s not added to the definition feature, because, again, definition 
is at level 1 and I don’t want to keep level 1 minimal.
Maybe we can use local-definition, or something similar, to signify that this 
feature highlights scoped definitions.
But you think function parameters should be in 'definition'? They are also 
"scoped", I would say.
I don’t think function parameters should be in ‘definition’. In fact, in my 
head, only the variable/function/class name of top-level constructs should be 
in ‘definition’. Now I can see that the name ‘definition’ is too vague for my 
original intent, and most ts modes probably don’t share the same interpretation 
as I do...

Maybe we can allow definition to include more things and move it to level 3, 
and add a more restricted ’top-level-definition’ to level 1 to take it’s 
current role. WDYT?

What about a split like function-definition/variable-definition? Not all functions are top-level. But there are also classes...

Or the features could just be called 'definition' and 'variable-definition', and that the former only contains functions and classes might simply be implied by the existence of the latter.





reply via email to

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