]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak python-ts-mode fontification (bug#59470)
authorYuan Fu <casouri@gmail.com>
Wed, 23 Nov 2022 02:47:47 +0000 (18:47 -0800)
committerYuan Fu <casouri@gmail.com>
Wed, 23 Nov 2022 03:07:27 +0000 (19:07 -0800)
* 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

index af59b8e1467dbe8fc3ed871ddeab48ae96b71780..3a919c8cf20f9fa32052b4d9ea977aea6aee3510 100644 (file)
@@ -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