summaryrefslogtreecommitdiff
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2022-11-22 18:47:47 -0800
committerYuan Fu <casouri@gmail.com>2022-11-22 19:07:27 -0800
commitd2ab1c4a9af205bbeeaf5a0b6333797c18e43f86 (patch)
tree9cf8ebad37f0f1f1fafa035b8140246333f36380 /lisp/progmodes/python.el
parent0ed313642227afdeccf48057eea458edca9d2962 (diff)
downloademacs-d2ab1c4a9af205bbeeaf5a0b6333797c18e43f86.tar.gz
emacs-d2ab1c4a9af205bbeeaf5a0b6333797c18e43f86.tar.bz2
emacs-d2ab1c4a9af205bbeeaf5a0b6333797c18e43f86.zip
Tweak python-ts-mode fontification (bug#59470)
* lisp/progmodes/python.el (python--treesit-settings): Only fontify the @ and the identifier of a decorator, not the argument list (if there is any).
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index af59b8e1467..3a919c8cf20 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1113,7 +1113,9 @@ fontified."
:feature 'decorator
:language 'python
- '((decorator) @font-lock-type-face)
+ '((decorator "@" @font-lock-type-face)
+ (decorator (call function: (identifier) @font-lock-type-face))
+ (decorator (identifier) @font-lock-type-face))
:feature 'type
:language 'python