Re: [PATCH] Syntax: Added syntax for Python decorators.
matteo_luigi_raso <[email protected]>
| Newsgroups | gmane.editors.nano.devel |
|---|---|
| Message-ID | <vnMAcU82dniwQMEefqZxlvLCg39N6F7OlQrTvZMp78chZFRgAnoL2kQJrsQ-eBzKoAqSjXRK4qoI5DEb13Ut0gQl0pJIqTctw6TBh-y9Ir4=@protonmail.com> |
Oops, meant to send a reply to the list but accidentally sent it to Benno. I'll post the entire exchange. >On Thursday, January 19th, 2023 at 7:01 AM, Benno Schulenberg <[email protected]> >wrote: >> This commit message is too verbose -- too much banter. Instead it would >> be good to include a URL to a webpage that documents these "decorators". >> For example: https://peps.python.org/pep-0318/. But maybe you have a >> better one? > Actually, it's probably not necessary to explain the syntax of Python > decorators at all. I only put that wall of text in case you didn't know the > syntax of the decorators, but since you do, there's no need to explain it. >> color sea "@[[:alpha:]][[:alnum:]_.]*" >> >> I've chosen 'sea' as color, because for me 'sky' has too low a contrast >> with the lightblue of function names. Does this color and regex work for >> you? >For the most part. Not a huge fan of the colour change, but it's easy >enough to customize, so I'm not worried about it. In response, Benno wrote: >Please send your email to the list, not to me. >Op 20-01-2023 om 08:59 schreef matteo_luigi_raso: >> Actually, it's probably not necessary to explain the syntax of Python >> decorators at all. I only put that wall of text in case you didn't know the >> syntax of the decorators, but since you do, there's no need to explain it. >I knew nothing about decorators -- I had to google for it. But it's not about me, it is about >anyone that reads the git history. So the commit message /does/ need to explain concisely >what decorators are, or at least needs to refer to its canonical documentation. >Benno Ok, I've added a link in the commit message to the official documentation for Python decorators. Sorry about that mixup, I don't have much experience with mailing lists. Sent with [Proton Mail](https://proton.me/) secure email.
0001-SYNTAX-Added-colouring-for-Python-decorators.patch
(text/x-patch, 1.1 KB)
From 75f87c365f79619784296c25250449245b6f66e0 Mon Sep 17 00:00:00 2001 From: Matteo Raso <[email protected]> Date: Fri, 20 Jan 2023 02:50:38 -0500 Subject: [PATCH] SYNTAX: Added colouring for Python decorators Documentation for Python decorators can be found at https://peps.python.org/pep-0318/. Signed-off-by: Matteo Raso <[email protected]> --- syntax/python.nanorc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/syntax/python.nanorc b/syntax/python.nanorc index e8ba17e2..e0073b51 100644 --- a/syntax/python.nanorc +++ b/syntax/python.nanorc @@ -24,11 +24,15 @@ color brightcyan "\<(exec|print)([[:blank:]]|$)" # Special values. color brightmagenta "\<(False|None|True)\>" +#Decorators. +color sea "@[[:alpha:]_][[:alnum:]_.]*" + # Mono-quoted strings. color brightgreen "'([^'\]|\\.)*'|"([^"\]|\\.)*"|'''|"""" color normal "'''|"""" # Comments. color brightred "(^|[[:blank:]])#.*" + # Triple-quoted strings. color brightgreen start="'''([^'),]|$)" end="(^|[^(\])'''" color brightgreen start=""""([^"),]|$)" end="(^|[^(\])"""" -- 2.38.1