Skip to content

Commit 5f21399

Browse files
committed
Add Zig syntax highlighting
1 parent bf41e77 commit 5f21399

File tree

2 files changed

+290
-0
lines changed

2 files changed

+290
-0
lines changed
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<SyntaxDefinition name="Zig" extensions=".zig">
4+
5+
<Environment>
6+
<Default color="#D4D4D4" bgcolor="#1E1E1E"/>
7+
<Selection color="#1E1E1E" bgcolor="#264F78"/>
8+
<LineNumbers color="#858585" bgcolor="#1E1E1E"/>
9+
<CaretMarker color="#AEAFAD"/>
10+
<VRuler color="#2A2A2A"/>
11+
12+
<FoldLine color="#858585" bgcolor="#1E1E1E"/>
13+
<FoldMarker color="#D4D4D4" bgcolor="#1E1E1E"/>
14+
<SelectedFoldLine color="#D4D4D4" bgcolor="#1E1E1E"/>
15+
16+
<EOLMarkers color="#404040"/>
17+
<SpaceMarkers color="#404040"/>
18+
<TabMarkers color="#404040"/>
19+
<InvalidLines color="#404040"/>
20+
</Environment>
21+
22+
<Properties>
23+
<Property name="LineComment" value="//"/>
24+
<Property name="BlockCommentBegin" value="/*"/>
25+
<Property name="BlockCommentEnd" value="*/"/>
26+
</Properties>
27+
28+
<Digits name="Digits" color="#B5CEA8"/>
29+
30+
<RuleSets>
31+
<RuleSet ignorecase="false">
32+
33+
<Delimiters>()[]{},:.@`=;+-*/%~ &amp;|^&gt;&lt;</Delimiters>
34+
35+
<Span name="LineComment" stopateol="true" color="#608B4E" bold="false" italic="false">
36+
<Begin>//</Begin>
37+
</Span>
38+
39+
<Span name="BlockComment" stopateol="false" color="#608B4E" bold="false" italic="false">
40+
<Begin>/*</Begin>
41+
<End>*/</End>
42+
</Span>
43+
44+
<Span name="String" stopateol="true" color="#CE9178" bold="false" italic="false" escapecharacter="\">
45+
<Begin>"</Begin>
46+
<End>"</End>
47+
</Span>
48+
49+
<Span name="Char" stopateol="true" color="#CE9178" bold="false" italic="false" escapecharacter="\">
50+
<Begin>'</Begin>
51+
<End>'</End>
52+
</Span>
53+
54+
<KeyWords name="Keywords" color="#569CD6" bold="false" italic ="false">
55+
<Key word="addrspace"/>
56+
<Key word="align"/>
57+
<Key word="allowzero"/>
58+
<Key word="and"/>
59+
<Key word="anyframe"/>
60+
<Key word="anytype"/>
61+
<Key word="asm"/>
62+
<Key word="async"/>
63+
<Key word="await"/>
64+
<Key word="break"/>
65+
<Key word="callconv"/>
66+
<Key word="catch"/>
67+
<Key word="comptime"/>
68+
<Key word="const"/>
69+
<Key word="continue"/>
70+
<Key word="defer"/>
71+
<Key word="else"/>
72+
<Key word="enum"/>
73+
<Key word="errdefer"/>
74+
<Key word="error"/>
75+
<Key word="export"/>
76+
<Key word="extern"/>
77+
<Key word="false"/>
78+
<Key word="for"/>
79+
<Key word="if"/>
80+
<Key word="inline"/>
81+
<Key word="linksection"/>
82+
<Key word="noalias"/>
83+
<Key word="noinline"/>
84+
<Key word="nosuspend"/>
85+
<Key word="opaque"/>
86+
<Key word="or"/>
87+
<Key word="orelse"/>
88+
<Key word="packed"/>
89+
<Key word="pub"/>
90+
<Key word="resume"/>
91+
<Key word="return"/>
92+
<Key word="struct"/>
93+
<Key word="suspend"/>
94+
<Key word="switch"/>
95+
<Key word="test"/>
96+
<Key word="threadlocal"/>
97+
<Key word="true"/>
98+
<Key word="try"/>
99+
<Key word="union"/>
100+
<Key word="unreachable"/>
101+
<Key word="usingnamespace"/>
102+
<Key word="var"/>
103+
<Key word="volatile"/>
104+
<Key word="while"/>
105+
<Key word="null"/>
106+
<Key word="undefined"/>
107+
</KeyWords>
108+
109+
<KeyWords name="Types" color="#4EC9B0" bold="false" italic ="false">
110+
<Key word="bool"/>
111+
<Key word="void"/>
112+
<Key word="noreturn"/>
113+
<Key word="type"/>
114+
<Key word="anyopaque"/>
115+
<Key word="i8"/>
116+
<Key word="i16"/>
117+
<Key word="i32"/>
118+
<Key word="i64"/>
119+
<Key word="i128"/>
120+
<Key word="isize"/>
121+
<Key word="u8"/>
122+
<Key word="u16"/>
123+
<Key word="u32"/>
124+
<Key word="u64"/>
125+
<Key word="u128"/>
126+
<Key word="usize"/>
127+
<Key word="f16"/>
128+
<Key word="f32"/>
129+
<Key word="f64"/>
130+
<Key word="f80"/>
131+
<Key word="f128"/>
132+
<Key word="c_short"/>
133+
<Key word="c_ushort"/>
134+
<Key word="c_int"/>
135+
<Key word="c_uint"/>
136+
<Key word="c_long"/>
137+
<Key word="c_ulong"/>
138+
<Key word="c_longlong"/>
139+
<Key word="c_ulonglong"/>
140+
<Key word="c_longdouble"/>
141+
<Key word="c_void"/>
142+
</KeyWords>
143+
</RuleSet>
144+
</RuleSets>
145+
</SyntaxDefinition>
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<SyntaxDefinition name="Zig" extensions=".zig">
4+
5+
<Environment>
6+
<Default color="Black" bgcolor="#FFFFFF"/>
7+
<Selection color="Black" bgcolor="#C3C3FF"/>
8+
<LineNumbers color="Gray" bgcolor="#FFFFFF"/>
9+
<CaretMarker color="#F0F0F1"/>
10+
<VRuler color="#E0E0E5"/>
11+
12+
<FoldLine color="#A0A0A0" bgcolor="#FFFFFF"/>
13+
<FoldMarker color="Black" bgcolor="#FFFFFF"/>
14+
<SelectedFoldLine color="Black" bgcolor="#FFFFFF"/>
15+
16+
<EOLMarkers color="#CACAD2"/>
17+
<SpaceMarkers color="#B6B6C0"/>
18+
<TabMarkers color="#B6B6C0"/>
19+
<InvalidLines color="#B6B6C0"/>
20+
</Environment>
21+
22+
<Properties>
23+
<Property name="LineComment" value="//"/>
24+
<Property name="BlockCommentBegin" value="/*"/>
25+
<Property name="BlockCommentEnd" value="*/"/>
26+
</Properties>
27+
28+
<Digits name="Digits" color="Teal"/>
29+
30+
<RuleSets>
31+
<RuleSet ignorecase="false">
32+
33+
<Delimiters>()[]{},:.@`=;+-*/%~ &amp;|^&gt;&lt;</Delimiters>
34+
35+
<Span name="LineComment" stopateol="true" color="Green" bold="false" italic="false">
36+
<Begin>//</Begin>
37+
</Span>
38+
39+
<Span name="BlockComment" stopateol="false" color="Green" bold="false" italic="false">
40+
<Begin>/*</Begin>
41+
<End>*/</End>
42+
</Span>
43+
44+
<Span name="String" stopateol="true" color="Maroon" bold="false" italic="false" escapecharacter="\">
45+
<Begin>"</Begin>
46+
<End>"</End>
47+
</Span>
48+
49+
<Span name="Char" stopateol="true" color="Maroon" bold="false" italic="false" escapecharacter="\">
50+
<Begin>'</Begin>
51+
<End>'</End>
52+
</Span>
53+
54+
<KeyWords name="Keywords" color="Blue" bold="false" italic ="false">
55+
<Key word="addrspace"/>
56+
<Key word="align"/>
57+
<Key word="allowzero"/>
58+
<Key word="and"/>
59+
<Key word="anyframe"/>
60+
<Key word="anytype"/>
61+
<Key word="asm"/>
62+
<Key word="async"/>
63+
<Key word="await"/>
64+
<Key word="break"/>
65+
<Key word="callconv"/>
66+
<Key word="catch"/>
67+
<Key word="comptime"/>
68+
<Key word="const"/>
69+
<Key word="continue"/>
70+
<Key word="defer"/>
71+
<Key word="else"/>
72+
<Key word="enum"/>
73+
<Key word="errdefer"/>
74+
<Key word="error"/>
75+
<Key word="export"/>
76+
<Key word="extern"/>
77+
<Key word="false"/>
78+
<Key word="for"/>
79+
<Key word="if"/>
80+
<Key word="inline"/>
81+
<Key word="linksection"/>
82+
<Key word="noalias"/>
83+
<Key word="noinline"/>
84+
<Key word="nosuspend"/>
85+
<Key word="opaque"/>
86+
<Key word="or"/>
87+
<Key word="orelse"/>
88+
<Key word="packed"/>
89+
<Key word="pub"/>
90+
<Key word="resume"/>
91+
<Key word="return"/>
92+
<Key word="struct"/>
93+
<Key word="suspend"/>
94+
<Key word="switch"/>
95+
<Key word="test"/>
96+
<Key word="threadlocal"/>
97+
<Key word="true"/>
98+
<Key word="try"/>
99+
<Key word="union"/>
100+
<Key word="unreachable"/>
101+
<Key word="usingnamespace"/>
102+
<Key word="var"/>
103+
<Key word="volatile"/>
104+
<Key word="while"/>
105+
<Key word="null"/>
106+
<Key word="undefined"/>
107+
</KeyWords>
108+
109+
<KeyWords name="Types" color="#2B91AF" bold="false" italic ="false">
110+
<Key word="bool"/>
111+
<Key word="void"/>
112+
<Key word="noreturn"/>
113+
<Key word="type"/>
114+
<Key word="anyopaque"/>
115+
<Key word="i8"/>
116+
<Key word="i16"/>
117+
<Key word="i32"/>
118+
<Key word="i64"/>
119+
<Key word="i128"/>
120+
<Key word="isize"/>
121+
<Key word="u8"/>
122+
<Key word="u16"/>
123+
<Key word="u32"/>
124+
<Key word="u64"/>
125+
<Key word="u128"/>
126+
<Key word="usize"/>
127+
<Key word="f16"/>
128+
<Key word="f32"/>
129+
<Key word="f64"/>
130+
<Key word="f80"/>
131+
<Key word="f128"/>
132+
<Key word="c_short"/>
133+
<Key word="c_ushort"/>
134+
<Key word="c_int"/>
135+
<Key word="c_uint"/>
136+
<Key word="c_long"/>
137+
<Key word="c_ulong"/>
138+
<Key word="c_longlong"/>
139+
<Key word="c_ulonglong"/>
140+
<Key word="c_longdouble"/>
141+
<Key word="c_void"/>
142+
</KeyWords>
143+
</RuleSet>
144+
</RuleSets>
145+
</SyntaxDefinition>

0 commit comments

Comments
 (0)