]> git.eshelyaron.com Git - emacs.git/commitdiff
python-ts-mode: Highlight default parameters
authorMaciej Kalandyk <m.kalandyk@outlook.com>
Sun, 10 Dec 2023 23:15:34 +0000 (01:15 +0200)
committerEshel Yaron <me@eshelyaron.com>
Thu, 21 Dec 2023 20:51:17 +0000 (21:51 +0100)
* lisp/progmodes/python.el (python--treesit-settings):
Highlight default parameters (bug#67703).

(cherry picked from commit eace9e1122601bdc2f7f03228816198ce726f8fc)

lisp/progmodes/python.el

index ab3bf1b4ec0e7be6d6859968b0ab3b5c3ee9fec2..211969140ab742cfc941a50e05a5609b4421fa25 100644 (file)
@@ -1124,7 +1124,8 @@ fontified."
       name: (identifier) @font-lock-function-name-face)
      (class_definition
       name: (identifier) @font-lock-type-face)
-     (parameters (identifier) @font-lock-variable-name-face))
+     (parameters (identifier) @font-lock-variable-name-face)
+     (parameters (default_parameter name: (identifier) @font-lock-variable-name-face)))
 
    :feature 'function
    :language 'python