From a6e1f611c61d2f8a8ebf663a19982cd25152cf4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jostein=20Kj=C3=B8nigsen?= Date: Sun, 11 Dec 2022 21:20:27 +0100 Subject: [PATCH 4/4] python-ts-mode: fontify function-invocations using font-lock-function-name. This is consistent with how many other tree-sitter based major-modes does it, and would improve consistency for fontification in Emacs. --- lisp/progmodes/python.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index ebee703499a..f86fc4bbeac 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1089,10 +1089,14 @@ python--treesit-settings :feature 'definition :language 'python + :override t '((function_definition name: (identifier) @font-lock-function-name-face) (class_definition - name: (identifier) @font-lock-type-face)) + name: (identifier) @font-lock-type-face) + (call function: (identifier) @font-lock-function-name-face) + (call function: (attribute + attribute: (identifier) @font-lock-function-name-face))) :feature 'keyword :language 'python @@ -1158,7 +1162,6 @@ python--treesit-settings :feature 'property :language 'python - :override t '((attribute attribute: (identifier) @font-lock-property-face) (class_definition -- 2.37.2