[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d2ab1c4a9a 2/3: Tweak python-ts-mode fontification (bug#59470)
From: |
Yuan Fu |
Subject: |
master d2ab1c4a9a 2/3: Tweak python-ts-mode fontification (bug#59470) |
Date: |
Tue, 22 Nov 2022 23:00:02 -0500 (EST) |
branch: master
commit d2ab1c4a9af205bbeeaf5a0b6333797c18e43f86
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>
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).
---
lisp/progmodes/python.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index af59b8e146..3a919c8cf2 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