diff options
Diffstat (limited to 'queries/python')
| -rw-r--r-- | queries/python/highlights.scm | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm index 2363dc323..77edc7960 100644 --- a/queries/python/highlights.scm +++ b/queries/python/highlights.scm @@ -310,7 +310,7 @@ (future_import_statement "from" @keyword.import - "__future__" @constant.builtin) + "__future__" @module.builtin) (import_from_statement "from" @keyword.import) @@ -323,6 +323,25 @@ (wildcard_import "*" @character.special) +(import_statement + name: (dotted_name + (identifier) @module)) + +(import_statement + name: (aliased_import + name: (dotted_name + (identifier) @module) + alias: (identifier) @module)) + +(import_from_statement + module_name: (dotted_name + (identifier) @module)) + +(import_from_statement + module_name: (relative_import + (dotted_name + (identifier) @module))) + [ "if" "elif" |
