Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/svelte/highlights.scm')
-rw-r--r--runtime/queries/svelte/highlights.scm72
1 files changed, 51 insertions, 21 deletions
diff --git a/runtime/queries/svelte/highlights.scm b/runtime/queries/svelte/highlights.scm
index efd41406..4c6f5f35 100644
--- a/runtime/queries/svelte/highlights.scm
+++ b/runtime/queries/svelte/highlights.scm
@@ -1,38 +1,68 @@
-; inherits: html
+; Special identifiers
+;--------------------
-(raw_text) @none
+; TODO:
+((element (start_tag (tag_name) @_tag) (text) @markup.heading)
+ (#match? @_tag "^(h[0-9]|title)$"))
-[
- "as"
- "key"
- "html"
- "debug"
- "snippet"
- "render"
-] @keyword
+((element (start_tag (tag_name) @_tag) (text) @markup.bold)
+ (#match? @_tag "^(strong|b)$"))
+
+((element (start_tag (tag_name) @_tag) (text) @markup.italic)
+ (#match? @_tag "^(em|i)$"))
+
+; ((element (start_tag (tag_name) @_tag) (text) @markup.strike)
+; (#match? @_tag "^(s|del)$"))
+
+((element (start_tag (tag_name) @_tag) (text) @markup.underline)
+ (#eq? @_tag "u"))
+
+((element (start_tag (tag_name) @_tag) (text) @markup.inline)
+ (#match? @_tag "^(code|kbd)$"))
-"const" @keyword.storage.modifier
+((element (start_tag (tag_name) @_tag) (text) @markup.underline.link)
+ (#eq? @_tag "a"))
+
+((attribute
+ (attribute_name) @_attr
+ (quoted_attribute_value (attribute_value) @markup.undeline.link))
+ (#match? @_attr "^(href|src)$"))
+
+(tag_name) @tag
+(attribute_name) @property
+(erroneous_end_tag_name) @error
+(comment) @comment
[
- "if"
- "else if"
- "else"
- "then"
- "await"
-] @keyword.control.conditional
+ (attribute_value)
+ (quoted_attribute_value)
+] @string
-"each" @keyword.control.repeat
+[
+ (text)
+ (raw_text_expr)
+] @none
-"catch" @keyword.control.exception
+[
+ (special_block_keyword)
+ (then)
+ (as)
+] @keyword
[
"{"
"}"
-] @punctuation.bracket
+] @punctuation.brackets
+
+"=" @operator
[
+ "<"
+ ">"
+ "</"
+ "/>"
"#"
":"
"/"
"@"
-] @punctuation.delimiter
+] @punctuation.definition.tag