aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/superhtml
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-06-12 09:54:30 -0600
committerChristian Clason <c.clason@uni-graz.at>2025-05-12 18:43:40 +0200
commit692b051b09935653befdb8f7ba8afdb640adf17b (patch)
tree167162b6b129ae04f68c5735078521a72917c742 /runtime/queries/superhtml
parentfeat(c-family): inherit injections (diff)
downloadnvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.gz
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.bz2
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.lz
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.xz
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.zst
nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.zip
feat!: drop modules, general refactor and cleanup
Diffstat (limited to 'runtime/queries/superhtml')
-rw-r--r--runtime/queries/superhtml/highlights.scm44
-rw-r--r--runtime/queries/superhtml/injections.scm7
2 files changed, 51 insertions, 0 deletions
diff --git a/runtime/queries/superhtml/highlights.scm b/runtime/queries/superhtml/highlights.scm
new file mode 100644
index 000000000..cbf366d1c
--- /dev/null
+++ b/runtime/queries/superhtml/highlights.scm
@@ -0,0 +1,44 @@
+(doctype) @constant
+
+(comment) @comment
+
+(tag_name) @tag
+
+((tag_name) @string.special
+ (#any-of? @string.special "super" "extend"))
+
+(attribute_name) @attribute
+
+(attribute_value) @string
+
+((element
+ (start_tag
+ (attribute
+ (attribute_name) @_attribute
+ [
+ (attribute_value) @markup.link.url
+ (quoted_attribute_value
+ (attribute_value) @markup.link.url)
+ ]))
+ (element
+ (start_tag
+ (tag_name) @tag)))
+ (#eq? @tag "super")
+ (#eq? @_attribute "id"))
+
+(element
+ (start_tag
+ (tag_name) @string.special)
+ (#eq? @string.special "super"))
+
+"\"" @string
+
+[
+ "<"
+ ">"
+ "</"
+ "/>"
+ "<!"
+] @punctuation.bracket
+
+"=" @punctuation.delimiter
diff --git a/runtime/queries/superhtml/injections.scm b/runtime/queries/superhtml/injections.scm
new file mode 100644
index 000000000..138fe7c23
--- /dev/null
+++ b/runtime/queries/superhtml/injections.scm
@@ -0,0 +1,7 @@
+((script_element
+ (raw_text) @injection.content)
+ (#set! injection.language "javascript"))
+
+((style_element
+ (raw_text) @injection.content)
+ (#set! injection.language "css"))