diff options
| author | Noah Peart | 2024-04-30 02:55:18 -0700 |
|---|---|---|
| committer | Yuan Fu | 2024-05-01 21:26:29 -0700 |
| commit | 0f92d433d2b806eb58a9a4c0197344b08ea5ae65 (patch) | |
| tree | ac37a8fea44d120caf1cebb604b08ef099aa189d /lisp/progmodes/python.el | |
| parent | b84fa71f8985284560bacda7d407e3559583844f (diff) | |
| download | emacs-0f92d433d2b806eb58a9a4c0197344b08ea5ae65.tar.gz emacs-0f92d433d2b806eb58a9a4c0197344b08ea5ae65.zip | |
Add font-locking for typed parameters in python-ts-mode (bug#70665)
* lisp/progmodes/python.el (python--treesit-settings): Add
tree-sitter font-locking rule for typed parameters.
* test/lisp/progmodes/python-tests.el
(python-ts-mode-types-face-1): Test for
font-lock-variable-name-face in typed parameter.
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index d6c29e5ffc6..4ff5e9d4878 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1202,6 +1202,7 @@ fontified." | |||
| 1202 | (class_definition | 1202 | (class_definition |
| 1203 | name: (identifier) @font-lock-type-face) | 1203 | name: (identifier) @font-lock-type-face) |
| 1204 | (parameters (identifier) @font-lock-variable-name-face) | 1204 | (parameters (identifier) @font-lock-variable-name-face) |
| 1205 | (parameters (typed_parameter (identifier) @font-lock-variable-name-face)) | ||
| 1205 | (parameters (default_parameter name: (identifier) @font-lock-variable-name-face))) | 1206 | (parameters (default_parameter name: (identifier) @font-lock-variable-name-face))) |
| 1206 | 1207 | ||
| 1207 | :feature 'builtin | 1208 | :feature 'builtin |