Skip to content

Commit b89b2ea

Browse files
authored
Added yuck language support (for eww) (#6064)
1 parent 44729fb commit b89b2ea

4 files changed

Lines changed: 82 additions & 0 deletions

File tree

book/src/generated/lang-support.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,5 @@
147147
| xit || | | |
148148
| xml || || |
149149
| yaml || || `yaml-language-server` |
150+
| yuck || | | |
150151
| zig |||| `zls` |

languages.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2180,3 +2180,16 @@ comment-token = "("
21802180
[[grammar]]
21812181
name = "uxntal"
21822182
source = { git = "https://github.com/Jummit/tree-sitter-uxntal", rev = "9297e95ef74380b0ad84c4fd98f91e9f6e4319e6" }
2183+
2184+
[[language]]
2185+
name = "yuck"
2186+
scope = "source.yuck"
2187+
injection-regex = "yuck"
2188+
file-types = ["yuck"]
2189+
roots = []
2190+
comment-token = ";"
2191+
indent = { tab-width = 2, unit = " " }
2192+
2193+
[[grammar]]
2194+
name = "yuck"
2195+
source = { git = "https://github.com/Philipp-M/tree-sitter-yuck", rev = "9e97da5773f82123a8c8cccf8f7e795d140ed7d1" }
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
(ERROR) @error
2+
3+
(line_comment) @comment
4+
5+
; keywords and symbols
6+
7+
(keyword) @keyword
8+
(symbol) @tag
9+
10+
; literals
11+
12+
(bool_literal) @constant.builtin.boolean
13+
(num_literal) @constant.numeric
14+
15+
; strings
16+
(string_interpolation
17+
(string_interpolation_start) @punctuation.special
18+
(string_interpolation_end) @punctuation.special)
19+
20+
(escape_sequence) @constant.character.escape
21+
22+
(string
23+
[
24+
(unescaped_single_quote_string_fragment)
25+
(unescaped_double_quote_string_fragment)
26+
(unescaped_backtick_string_fragment)
27+
"\""
28+
"'"
29+
"`"
30+
]) @string
31+
32+
; operators and general punctuation
33+
34+
(unary_expression
35+
operator: _ @operator)
36+
37+
(binary_expression
38+
operator: _ @operator)
39+
40+
(ternary_expression
41+
operator: _ @operator)
42+
43+
[
44+
":"
45+
"."
46+
","
47+
] @punctuation.delimiter
48+
49+
[
50+
"("
51+
")"
52+
"["
53+
"]"
54+
"{"
55+
"}"
56+
] @punctuation.bracket
57+
[
58+
":"
59+
"."
60+
","
61+
] @punctuation.delimiter
62+
63+
; Rest (general identifiers that are not yet catched)
64+
65+
(index) @variable
66+
(ident) @variable
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
((line_comment) @injection.content
2+
(#set! injection.language "comment"))

0 commit comments

Comments
 (0)