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.scm | 72 |
1 files changed, 21 insertions, 51 deletions
diff --git a/runtime/queries/svelte/highlights.scm b/runtime/queries/svelte/highlights.scm index 7ab72903..efd41406 100644 --- a/runtime/queries/svelte/highlights.scm +++ b/runtime/queries/svelte/highlights.scm @@ -1,68 +1,38 @@ -; Special identifiers -;-------------------- +; inherits: html -(tag_name) @tag -(attribute_name) @variable.other.member -(erroneous_end_tag_name) @error -(comment) @comment +(raw_text) @none -; TODO: -((element (start_tag (tag_name) @_tag) (text) @markup.heading) - (#match? @_tag "^(h[0-9]|title)$")) - -((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)$")) - -((element (start_tag (tag_name) @_tag) (text) @markup.link.url) - (#eq? @_tag "a")) +[ + "as" + "key" + "html" + "debug" + "snippet" + "render" +] @keyword -((attribute - (attribute_name) @_attr - (quoted_attribute_value (attribute_value) @markup.link.url)) - (#match? @_attr "^(href|src)$")) +"const" @keyword.storage.modifier [ - (attribute_value) - (quoted_attribute_value) -] @string + "if" + "else if" + "else" + "then" + "await" +] @keyword.control.conditional -[ - (text) - (raw_text_expr) -] @none +"each" @keyword.control.repeat -[ - (special_block_keyword) - (then) - (as) -] @keyword +"catch" @keyword.control.exception [ "{" "}" -] @punctuation.brackets - -"=" @operator +] @punctuation.bracket [ - "<" - ">" - "</" - "/>" "#" ":" "/" "@" -] @punctuation.definition.tag +] @punctuation.delimiter |