Skip to content

Commit c16d871

Browse files
committed
add zon file recognition
closes #71
1 parent 8a4a3fe commit c16d871

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

Syntaxes/Zig.YAML-tmLanguage

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ uuid: 06C2FF99-3080-441A-9019-460C51E93116
66
scopeName: source.zig
77
fileTypes:
88
- zig
9+
- zon
910

1011
patterns:
1112
- include: '#dummy_main'
@@ -99,7 +100,7 @@ repository:
99100
name: punctuation.accessor.zig
100101
'3':
101102
name: entity.name.error.zig
102-
103+
103104
constants:
104105
patterns:
105106
- name: constant.language.zig
@@ -147,7 +148,7 @@ repository:
147148
- include: '#character_escapes'
148149
- name: invalid.illegal.character.zig
149150
match: \\[^\'][^\']*?
150-
151+
151152
- name: string.quoted.double.zig
152153
begin: c?\"
153154
end: \"
@@ -199,7 +200,7 @@ repository:
199200

200201
- name: keyword.operator.other.zig
201202
match: '(\+\+|\*\*|->|\.\?|\.\*|&(?=[a-zA-Z_]|@\")|\?|\|\||\.{2,3})'
202-
203+
203204
support:
204205
name: support.function.zig
205206
match: '(?<!\w)@[^\"\d][a-zA-Z_]\w*\b'
@@ -219,7 +220,7 @@ repository:
219220
match: '\b(c_short|c_ushort|c_int|c_uint|c_long|c_ulong|c_longlong|c_ulonglong|c_longdouble|c_void)\b'
220221

221222
- match: '\b(anyframe)\b\s*(->)?\s*(?:([a-zA-Z_][\w.]*|@\".+\")\b(?!\s*\())?'
222-
captures:
223+
captures:
223224
'1':
224225
name: storage.type.zig
225226
'2':

Syntaxes/Zig.sublime-syntax

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
name: Zig
55
file_extensions:
66
- zig
7+
- zon
78
scope: source.zig
89
contexts:
910
main:

Syntaxes/Zig.tmLanguage

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<key>fileTypes</key>
66
<array>
77
<string>zig</string>
8+
<string>zon</string>
89
</array>
910
<key>keyEquivalent</key>
1011
<string>^~Z</string>

Syntaxes/Zig.tmLanguage.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"scopeName": "source.zig",
33
"fileTypes": [
4-
"zig"
4+
"zig",
5+
"zon"
56
],
67
"uuid": "06C2FF99-3080-441A-9019-460C51E93116",
78
"patterns": [
@@ -548,4 +549,4 @@
548549
}
549550
},
550551
"name": "Zig"
551-
}
552+
}

0 commit comments

Comments
 (0)