summaryrefslogtreecommitdiff
path: root/runtime/queries/python/highlights.scm
diff options
context:
space:
mode:
authorChrHorn2022-08-01 21:14:07 +0000
committerGitHub2022-08-01 21:14:07 +0000
commit11367488ac512241b61c6896bfd5d5d32e981b14 (patch)
tree8e61d944ed13268c44e74fb4d6ca8e59bc6b30a2 /runtime/queries/python/highlights.scm
parent0c08ff1596b398d53c8c48cc96cfbd24ddec303b (diff)
Improve Python queries, add locals (#3284)
Diffstat (limited to 'runtime/queries/python/highlights.scm')
-rw-r--r--runtime/queries/python/highlights.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/queries/python/highlights.scm b/runtime/queries/python/highlights.scm
index 1c4d62b2..a94d7caf 100644
--- a/runtime/queries/python/highlights.scm
+++ b/runtime/queries/python/highlights.scm
@@ -1,5 +1,10 @@
+; Imports
+
(dotted_name
(identifier)* @namespace)
+
+(aliased_import
+ alias: (identifier) @namespace)
; Builtin functions
@@ -55,7 +60,6 @@
(parameters (typed_parameter (identifier) @variable.parameter))
(parameters (default_parameter name: (identifier) @variable.parameter))
(parameters (typed_default_parameter name: (identifier) @variable.parameter))
-(keyword_argument name: (identifier) @variable.parameter)
(parameters
(list_splat_pattern ; *args
@@ -63,6 +67,9 @@
(parameters
(dictionary_splat_pattern ; **kwargs
(identifier) @variable.parameter))
+
+(lambda_parameters
+ (identifier) @variable.parameter)
; Types