diff options
author | Philipp Mildenberger | 2023-02-20 22:42:54 +0000 |
---|---|---|
committer | GitHub | 2023-02-20 22:42:54 +0000 |
commit | b89b2eaf68c53a2c10a0f649f9487ad46c85e11e (patch) | |
tree | d95d1c3cfa6aba993a902bdf7ec784ce469b68a8 /runtime/queries | |
parent | 44729fbaf9778b67869b2ed6b76b16b2354cc030 (diff) |
Added yuck language support (for eww) (#6064)
Diffstat (limited to 'runtime/queries')
-rw-r--r-- | runtime/queries/yuck/highlights.scm | 66 | ||||
-rw-r--r-- | runtime/queries/yuck/injections.scm | 2 |
2 files changed, 68 insertions, 0 deletions
diff --git a/runtime/queries/yuck/highlights.scm b/runtime/queries/yuck/highlights.scm new file mode 100644 index 00000000..483348a8 --- /dev/null +++ b/runtime/queries/yuck/highlights.scm @@ -0,0 +1,66 @@ +(ERROR) @error + +(line_comment) @comment + +; keywords and symbols + +(keyword) @keyword +(symbol) @tag + +; literals + +(bool_literal) @constant.builtin.boolean +(num_literal) @constant.numeric + +; strings +(string_interpolation + (string_interpolation_start) @punctuation.special + (string_interpolation_end) @punctuation.special) + +(escape_sequence) @constant.character.escape + +(string + [ + (unescaped_single_quote_string_fragment) + (unescaped_double_quote_string_fragment) + (unescaped_backtick_string_fragment) + "\"" + "'" + "`" + ]) @string + +; operators and general punctuation + +(unary_expression + operator: _ @operator) + +(binary_expression + operator: _ @operator) + +(ternary_expression + operator: _ @operator) + +[ + ":" + "." + "," +] @punctuation.delimiter + +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket +[ + ":" + "." + "," +] @punctuation.delimiter + +; Rest (general identifiers that are not yet catched) + +(index) @variable +(ident) @variable diff --git a/runtime/queries/yuck/injections.scm b/runtime/queries/yuck/injections.scm new file mode 100644 index 00000000..d3fdb0ca --- /dev/null +++ b/runtime/queries/yuck/injections.scm @@ -0,0 +1,2 @@ +((line_comment) @injection.content + (#set! injection.language "comment")) |