aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorDmitry Gutov2023-11-24 00:00:32 +0200
committerDmitry Gutov2023-11-24 00:00:32 +0200
commit1978b603bc3068140833e478a8103fea1d185aec (patch)
treeed58f3cc2b1ceb43d0b372b6322a955f9548df5d /lisp/progmodes/python.el
parent99658346d1edce5248a8d8db76de772b04381e7f (diff)
downloademacs-1978b603bc3068140833e478a8103fea1d185aec.tar.gz
emacs-1978b603bc3068140833e478a8103fea1d185aec.zip
Make python-ts-mode's syntax-highlighting more standardized
This was brought up in a Reddit discussion. * lisp/progmodes/python.el (python--treesit-fontify-variable): Use font-lock-variable-use-face (since it applies to references). (python-ts-mode): Move 'property' from 3rd to 4th treesit-font-lock-level.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index e17651d9275..a7944576196 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1225,7 +1225,7 @@ For NODE, OVERRIDE, START, END, and ARGS, see
1225 (when (python--treesit-variable-p node) 1225 (when (python--treesit-variable-p node)
1226 (treesit-fontify-with-override 1226 (treesit-fontify-with-override
1227 (treesit-node-start node) (treesit-node-end node) 1227 (treesit-node-start node) (treesit-node-end node)
1228 'font-lock-variable-name-face override start end))) 1228 'font-lock-variable-use-face override start end)))
1229 1229
1230 1230
1231;;; Indentation 1231;;; Indentation
@@ -6717,8 +6717,8 @@ implementations: `python-mode' and `python-ts-mode'."
6717 '(( comment definition) 6717 '(( comment definition)
6718 ( keyword string type) 6718 ( keyword string type)
6719 ( assignment builtin constant decorator 6719 ( assignment builtin constant decorator
6720 escape-sequence number property string-interpolation ) 6720 escape-sequence number string-interpolation )
6721 ( bracket delimiter function operator variable))) 6721 ( bracket delimiter function operator variable property)))
6722 (setq-local treesit-font-lock-settings python--treesit-settings) 6722 (setq-local treesit-font-lock-settings python--treesit-settings)
6723 (setq-local imenu-create-index-function 6723 (setq-local imenu-create-index-function
6724 #'python-imenu-treesit-create-index) 6724 #'python-imenu-treesit-create-index)