Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

python: Fix splat parameter highlighting (#58136)

Alex Lachance7e6e731bce1f
diff --git a/crates/grammars/src/python/highlights.scm b/crates/grammars/src/python/highlights.scm
index d3230f9b62f..620f243a47b 100644
--- a/crates/grammars/src/python/highlights.scm
+++ b/crates/grammars/src/python/highlights.scm
@@ -90,6 +90,16 @@
name: (identifier) @variable.parameter) ; Default parameters
(typed_default_parameter
name: (identifier) @variable.parameter) ; Typed default parameters
+ (list_splat_pattern
+ (identifier) @variable.parameter) ; List splat parameters (*args)
+ (dictionary_splat_pattern
+ (identifier) @variable.parameter) ; Dictionary splat parameters (**kwargs)
+ (typed_parameter
+ (list_splat_pattern
+ (identifier) @variable.parameter)) ; Typed list splat parameters
+ (typed_parameter
+ (dictionary_splat_pattern
+ (identifier) @variable.parameter)) ; Typed dictionary splat parameters
]))
; Keyword arguments