Skip to content

Commit 17e6268

Browse files
Standardize syntax highlighting assets
1 parent 20af02b commit 17e6268

31 files changed

Lines changed: 881 additions & 708 deletions
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
(comment) @comment
2+
3+
[
4+
"FROM"
5+
"AS"
6+
"RUN"
7+
"CMD"
8+
"LABEL"
9+
"EXPOSE"
10+
"ENV"
11+
"ADD"
12+
"COPY"
13+
"ENTRYPOINT"
14+
"VOLUME"
15+
"USER"
16+
"WORKDIR"
17+
"ARG"
18+
"ONBUILD"
19+
"STOPSIGNAL"
20+
"HEALTHCHECK"
21+
"SHELL"
22+
"MAINTAINER"
23+
"CROSS_BUILD"
24+
] @keyword
25+
26+
(image_spec
27+
(image_name) @string)
28+
29+
(image_spec
30+
(image_tag
31+
"/" @operator
32+
(image_name) @string))
33+
34+
(image_spec
35+
(image_tag) @string.special)
36+
37+
(image_spec
38+
(image_digest) @string.special)
39+
40+
(image_alias) @variable
41+
42+
(double_quoted_string) @string
43+
(single_quoted_string) @string
44+
(unquoted_string) @string
45+
46+
(expansion
47+
"$" @punctuation.special)
48+
(expansion
49+
(variable) @variable)
50+
51+
(expose_port) @number
52+
53+
(label_pair
54+
key: (unquoted_string) @property)
55+
56+
(env_pair
57+
name: (unquoted_string) @variable)
58+
59+
(arg_instruction
60+
name: (unquoted_string) @variable)
61+
62+
(param
63+
"--" @operator)
64+
(param
65+
(mount_param_param) @property)
66+
67+
(shell_command) @string
68+
69+
[
70+
"="
71+
":"
72+
] @operator
73+
74+
[
75+
"["
76+
"]"
77+
] @punctuation.bracket
50.6 KB
Binary file not shown.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
; Keywords
2+
[
3+
"if"
4+
"then"
5+
"else"
6+
"let"
7+
"in"
8+
] @keyword.control.elm
9+
(case) @keyword.control.elm
10+
(of) @keyword.control.elm
11+
12+
(colon) @keyword.other.elm
13+
(backslash) @keyword.other.elm
14+
(as) @keyword.other.elm
15+
(port) @keyword.other.elm
16+
(exposing) @keyword.other.elm
17+
(alias) @keyword.other.elm
18+
(infix) @keyword.other.elm
19+
20+
(arrow) @keyword.operator.arrow.elm
21+
22+
(port) @keyword.other.port.elm
23+
24+
(type_annotation(lower_case_identifier) @function.elm)
25+
(port_annotation(lower_case_identifier) @function.elm)
26+
(function_declaration_left(lower_case_identifier) @function.elm)
27+
(function_call_expr target: (value_expr) @function.elm)
28+
29+
(field_access_expr(value_expr(value_qid)) @local.function.elm)
30+
(lower_pattern) @local.function.elm
31+
(record_base_identifier) @local.function.elm
32+
33+
34+
(operator_identifier) @keyword.operator.elm
35+
(eq) @keyword.operator.assignment.elm
36+
37+
38+
"(" @punctuation.section.braces
39+
")" @punctuation.section.braces
40+
41+
"|" @keyword.other.elm
42+
"," @punctuation.separator.comma.elm
43+
44+
(import) @meta.import.elm
45+
(module) @keyword.other.elm
46+
47+
(number_constant_expr) @constant.numeric.elm
48+
49+
50+
(type) @keyword.type.elm
51+
52+
(type_declaration(upper_case_identifier) @storage.type.elm)
53+
(type_ref) @storage.type.elm
54+
(type_alias_declaration name: (upper_case_identifier) @storage.type.elm)
55+
56+
(union_variant(upper_case_identifier) @union.elm)
57+
(union_pattern) @union.elm
58+
(value_expr(upper_case_qid(upper_case_identifier)) @union.elm)
59+
60+
; comments
61+
(line_comment) @comment.elm
62+
(block_comment) @comment.elm
63+
64+
; strings
65+
(string_escape) @character.escape.elm
66+
67+
(open_quote) @string.elm
68+
(close_quote) @string.elm
69+
(regular_string_part) @string.elm
70+
71+
(open_char) @char.elm
72+
(close_char) @char.elm
73+
74+
75+
; glsl
76+
(glsl_content) @source.glsl
145 KB
Binary file not shown.
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
(comment) @comment
2+
3+
[
4+
"query"
5+
"mutation"
6+
"subscription"
7+
"fragment"
8+
"on"
9+
"type"
10+
"interface"
11+
"union"
12+
"enum"
13+
"input"
14+
"scalar"
15+
"schema"
16+
"directive"
17+
"extend"
18+
"implements"
19+
"repeatable"
20+
] @keyword
21+
22+
(operation_definition
23+
name: (name) @function)
24+
25+
(fragment_definition
26+
name: (name) @function)
27+
28+
(fragment_spread
29+
name: (name) @function)
30+
31+
(object_type_definition
32+
name: (name) @type)
33+
34+
(interface_type_definition
35+
name: (name) @type)
36+
37+
(union_type_definition
38+
name: (name) @type)
39+
40+
(enum_type_definition
41+
name: (name) @type)
42+
43+
(input_object_type_definition
44+
name: (name) @type)
45+
46+
(scalar_type_definition
47+
name: (name) @type)
48+
49+
(named_type
50+
(name) @type)
51+
52+
(field
53+
name: (name) @property)
54+
55+
(field_definition
56+
name: (name) @property)
57+
58+
(input_value_definition
59+
name: (name) @property)
60+
61+
(alias
62+
(name) @property)
63+
64+
(argument
65+
name: (name) @variable.parameter)
66+
67+
(directive
68+
"@" @punctuation.special
69+
name: (name) @attribute)
70+
71+
(enum_value) @constant
72+
73+
(variable
74+
"$" @punctuation.special
75+
name: (name) @variable)
76+
77+
(string_value) @string
78+
(int_value) @number
79+
(float_value) @number
80+
(boolean_value) @constant.builtin
81+
(null_value) @constant.builtin
82+
83+
[
84+
"="
85+
"|"
86+
"&"
87+
"!"
88+
":"
89+
"..."
90+
] @operator
91+
92+
[
93+
"{"
94+
"}"
95+
"["
96+
"]"
97+
"("
98+
")"
99+
] @punctuation.bracket
100+
101+
[
102+
","
103+
] @punctuation.delimiter
62 KB
Binary file not shown.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
(comment) @comment
2+
3+
[
4+
"syntax"
5+
"package"
6+
"import"
7+
"public"
8+
"weak"
9+
"option"
10+
"message"
11+
"enum"
12+
"service"
13+
"rpc"
14+
"returns"
15+
"stream"
16+
"extend"
17+
"oneof"
18+
"map"
19+
"reserved"
20+
"to"
21+
"extensions"
22+
"optional"
23+
"required"
24+
"repeated"
25+
] @keyword
26+
27+
(syntax) @keyword
28+
29+
(package
30+
(full_ident) @namespace)
31+
32+
(import
33+
(string) @string)
34+
35+
(option_name) @property
36+
37+
(message_name) @type
38+
(enum_name) @type
39+
(service_name) @type
40+
(rpc_name) @function
41+
42+
(message_body
43+
(field
44+
(identifier) @property))
45+
46+
(enum_body
47+
(enum_field
48+
(identifier) @constant))
49+
50+
(type) @type.builtin
51+
52+
(string) @string
53+
(int_lit) @number
54+
(float_lit) @number
55+
56+
(bool) @constant.builtin
57+
58+
[
59+
"="
60+
] @operator
61+
62+
[
63+
"{"
64+
"}"
65+
"["
66+
"]"
67+
"("
68+
")"
69+
"<"
70+
">"
71+
] @punctuation.bracket
72+
73+
[
74+
";"
75+
","
76+
"."
77+
] @punctuation.delimiter
90.2 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
; TODO: Add QL highlight queries
532 KB
Binary file not shown.

0 commit comments

Comments
 (0)