From f5c4671bfbad96bf346bd7e9a21fc4317b4959df Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Sat, 3 Dec 2022 17:00:20 +0530 Subject: Adds most of the tools --- .../runtime/queries/svelte/highlights.scm | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 helix-22.03-x86_64-windows/runtime/queries/svelte/highlights.scm (limited to 'helix-22.03-x86_64-windows/runtime/queries/svelte/highlights.scm') diff --git a/helix-22.03-x86_64-windows/runtime/queries/svelte/highlights.scm b/helix-22.03-x86_64-windows/runtime/queries/svelte/highlights.scm new file mode 100644 index 0000000..22b0c55 --- /dev/null +++ b/helix-22.03-x86_64-windows/runtime/queries/svelte/highlights.scm @@ -0,0 +1,68 @@ +; Special identifiers +;-------------------- + +; 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")) + +((attribute + (attribute_name) @_attr + (quoted_attribute_value (attribute_value) @markup.link.url)) + (#match? @_attr "^(href|src)$")) + +(tag_name) @tag +(attribute_name) @variable.other.member +(erroneous_end_tag_name) @error +(comment) @comment + +[ + (attribute_value) + (quoted_attribute_value) +] @string + +[ + (text) + (raw_text_expr) +] @none + +[ + (special_block_keyword) + (then) + (as) +] @keyword + +[ + "{" + "}" +] @punctuation.brackets + +"=" @operator + +[ + "<" + ">" + "" + "#" + ":" + "/" + "@" +] @punctuation.definition.tag -- cgit v1.2.3