commit c374c773ad6b0aa6e9bc29d6895ecda4609cdf47
parent 2fd7888a510917017477fa4ab06659b231fa3cc1
Author: Matteo Raso <matteo_luigi_raso@protonmail.com>
Date: Fri, 20 Jan 2023 02:50:38 -0500
syntax: python: colorize decorators specially
Decorators are documented at https://peps.python.org/pep-0318/.
Signed-off-by: Matteo Raso <matteo_luigi_raso@protonmail.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/syntax/python.nanorc b/syntax/python.nanorc
@@ -24,6 +24,9 @@ color brightcyan "\<(exec|print)([[:blank:]]|$)"
# Special values.
color brightmagenta "\<(False|None|True)\>"
+# Decorators.
+color cyan "@[[:alpha:]_][[:alnum:]_.]*"
+
# Mono-quoted strings.
color brightgreen "'([^'\]|\\.)*'|"([^"\]|\\.)*"|'''|""""
color normal "'''|""""