diff options
| author | Omar Valdez <omarantoniovaldezf2@gmail.com> | 2024-10-28 23:45:33 -0700 |
|---|---|---|
| committer | Christian Clason <ch.clason+github@icloud.com> | 2024-11-21 16:48:16 +0100 |
| commit | 8a74ac9aead72ef7a870908f1517b48f2bb25ac7 (patch) | |
| tree | 1b7b97d6ef86976fd15533686d9dfdd12d8baa35 /queries/python | |
| parent | feat(bash): highlight redirections (diff) | |
| download | nvim-treesitter-8a74ac9aead72ef7a870908f1517b48f2bb25ac7.tar nvim-treesitter-8a74ac9aead72ef7a870908f1517b48f2bb25ac7.tar.gz nvim-treesitter-8a74ac9aead72ef7a870908f1517b48f2bb25ac7.tar.bz2 nvim-treesitter-8a74ac9aead72ef7a870908f1517b48f2bb25ac7.tar.lz nvim-treesitter-8a74ac9aead72ef7a870908f1517b48f2bb25ac7.tar.xz nvim-treesitter-8a74ac9aead72ef7a870908f1517b48f2bb25ac7.tar.zst nvim-treesitter-8a74ac9aead72ef7a870908f1517b48f2bb25ac7.zip | |
feat(python): highlight modules
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" |
