Unnamed repository; edit this file 'description' to name the repository.
queries(python): always mark kwarg names as `@variable.parameter` (#14565)
may 4 months ago
parent 1c57722 · commit 8f8243a
-rw-r--r--runtime/queries/python/highlights.scm3
-rw-r--r--runtime/queries/python/locals.scm3
2 files changed, 6 insertions, 0 deletions
diff --git a/runtime/queries/python/highlights.scm b/runtime/queries/python/highlights.scm
index a8ec18c8..ad45d495 100644
--- a/runtime/queries/python/highlights.scm
+++ b/runtime/queries/python/highlights.scm
@@ -75,6 +75,9 @@
(lambda_parameters
(identifier) @variable.parameter)
+(keyword_argument
+ name: (identifier) @variable.parameter)
+
; - Builtin
((identifier) @variable.builtin
(#any-of? @variable.builtin "self" "cls"))
diff --git a/runtime/queries/python/locals.scm b/runtime/queries/python/locals.scm
index 24800870..955ebc52 100644
--- a/runtime/queries/python/locals.scm
+++ b/runtime/queries/python/locals.scm
@@ -45,3 +45,6 @@
(identifier) @local.reference
+; don't make the name of kwargs locals
+(keyword_argument
+ name: (identifier) @variable.parameter)