diff options
| author | Pham Huy Hoang <hoangtun0810@gmail.com> | 2023-04-30 21:03:34 +0900 |
|---|---|---|
| committer | Amaan Qureshi <amaanq12@gmail.com> | 2023-04-30 23:30:10 -0400 |
| commit | da79f9afe60b84111207c963c3d6220a21b4c737 (patch) | |
| tree | a5572d7389725db67e9e5e71f364a588b2601661 | |
| parent | Update README (diff) | |
| download | nvim-treesitter-da79f9afe60b84111207c963c3d6220a21b4c737.tar nvim-treesitter-da79f9afe60b84111207c963c3d6220a21b4c737.tar.gz nvim-treesitter-da79f9afe60b84111207c963c3d6220a21b4c737.tar.bz2 nvim-treesitter-da79f9afe60b84111207c963c3d6220a21b4c737.tar.lz nvim-treesitter-da79f9afe60b84111207c963c3d6220a21b4c737.tar.xz nvim-treesitter-da79f9afe60b84111207c963c3d6220a21b4c737.tar.zst nvim-treesitter-da79f9afe60b84111207c963c3d6220a21b4c737.zip | |
feat: add py-script injections for html
| -rw-r--r-- | queries/html/injections.scm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/queries/html/injections.scm b/queries/html/injections.scm index 7ddb5beae..23981018c 100644 --- a/queries/html/injections.scm +++ b/queries/html/injections.scm @@ -1 +1,24 @@ ; inherits html_tags + +(element + (start_tag + (tag_name) @_py_script) + (text) @python + (#any-of? @_py_script "py-script" "py-repl")) + +(script_element + (start_tag + (attribute + (attribute_name) @_attr + (quoted_attribute_value + (attribute_value) @_type))) + (raw_text) @python + (#eq? @_attr "type") + ; not adding type="py" here as it's handled by html_tags + (#any-of? @_type "pyscript" "py-script")) + +(element + (start_tag + (tag_name) @_py_config) + (text) @toml + (#eq? @_py_config "py-config")) |
