Skip to content

Commit 48978fe

Browse files
committed
add ignore, io, odin syntaxes
1 parent 2253678 commit 48978fe

12 files changed

+1398
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ Syntax highlighting for
2323
- i3
2424
- infokey
2525
- inputrc
26+
- IO
2627
- JSON5
2728
- jsonl
2829
- Linker Scripts
2930
- M3U
3031
- Linker Maps
3132
- Ninja
33+
- Odin
3234
- gettext / po
3335
- Protobuf
3436
- QlikView
@@ -61,12 +63,14 @@ Syntax highlighting for
6163
- [vscode-hla](https://github.com/GreenXenith/vscode-hla) by GreenXenith (MIT)
6264
- [i3wm-syntax](https://github.com/dcasella/i3wm-syntax) by dcasella (Apache-2.0)
6365
- [terminfo.sublime-syntax](https://github.com/zgracem/terminfo.sublime-syntax) by zgracem (MIT)
66+
- [vscode-io-extension](https://github.com/KennethanCeyer/vscode-io-extension) by KennethanCeyer (MIT)
6467
- [vscode-json5](https://github.com/mrmlnc/vscode-json5) by mrmlnc (MIT)
6568
- [jsonl](https://github.com/Alpha4/jsonl) by Alpha4 (MIT)
6669
- [vscode-linkerscript](https://github.com/TheNetAdmin/vscode-linkerscript) by TheNetAdmin (MIT)
6770
- [vscode-m3u](https://github.com/af4jm/vscode-m3u) by af4jm (Apache-2.0)
6871
- [vscode-gnu-map](https://github.com/trond-snekvik/vscode-gnu-map) by trond-snekvik (MIT)
6972
- [vscode-ninja-syntax](https://github.com/melak47/vscode-ninja-syntax) by melak47 (MIT)
73+
- [odin-vscode](https://github.com/fivemoreminix/odin-vscode) by fivemoreminix (MIT)
7074
- [vscode-gettext](https://github.com/MrOrz/vscode-gettext) by MrOrz (MIT)
7175
- [vscode-proto3](https://github.com/zxh0/vscode-proto3) by zxh0 )MIT
7276
- [textproto-grammar](https://github.com/thejustinwalsh/textproto-grammar) by thejustinwalsh (MIT)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"comments": {
3+
// symbol used for single line comment. Remove this entry if your language does not support line comments
4+
"lineComment": "//",
5+
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
6+
"blockComment": []
7+
},
8+
// symbols used as brackets
9+
"brackets": [],
10+
// symbols that are auto closed when typing
11+
"autoClosingPairs": [],
12+
// symbols that that can be used to surround a selection
13+
"surroundingPairs": []
14+
}
Lines changed: 314 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,314 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3+
"name": "io",
4+
"scopeName": "source.io",
5+
"uuid": "3607cc0a-09af-4d1b-bd2d-87fb32c777cd",
6+
"fileTypes": [".io"],
7+
"patterns": [
8+
{
9+
"include": "#comments"
10+
},
11+
{
12+
"include": "#brackets"
13+
},
14+
{
15+
"include": "#supports"
16+
},
17+
{
18+
"include": "#keywords"
19+
},
20+
{
21+
"include": "#strings"
22+
}
23+
],
24+
"repository": {
25+
"constants": {
26+
"patterns": [
27+
{
28+
"name": "constant.numeric.io",
29+
"match": "\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\b"
30+
}
31+
]
32+
},
33+
"comments": {
34+
"patterns": [
35+
{
36+
"name": "comment.line.io",
37+
"match": "(#|//).*"
38+
},
39+
{
40+
"name": "comment.block.io",
41+
"begin": "/\\*",
42+
"beginCaptures": {
43+
"0": {
44+
"name": "unctuation.definition.comment.begin.io"
45+
}
46+
},
47+
"end": "\\*/",
48+
"endCaptures": {
49+
"0": {
50+
"name": "unctuation.definition.comment.end.io"
51+
}
52+
}
53+
}
54+
]
55+
},
56+
"brackets": {
57+
"patterns": [
58+
{
59+
"begin": "\\[",
60+
"end": "\\]|(?=\\*/)",
61+
"patterns": [
62+
{
63+
"include": "#brackets"
64+
}
65+
]
66+
}
67+
]
68+
},
69+
"supports": {
70+
"patterns": [
71+
{
72+
"include": "#class-identifier"
73+
},
74+
{
75+
"include": "#function-identifier"
76+
},
77+
{
78+
"name": "support.class.io",
79+
"match": "\\b(Object|File|Date|URL|Socket|WebRequest|HttpServer|HttpRequestHandler|Server|Thread|Scheduler)\\b"
80+
},
81+
{
82+
"name": "support.class.import.io",
83+
"match": "\\b(Importer)\\b"
84+
},
85+
{
86+
"name": "support.class.error.io",
87+
"match": "\\b(Exception|Error)\\b"
88+
},
89+
{
90+
"name": "support.class.test.io",
91+
"match": "\\b(Suite|Spec|Matcher)\\b"
92+
},
93+
{
94+
"name": "support.class.type.io",
95+
"match": "\\b(String|Number|Dictionary|Directory|List|Sequence|Range)\\b"
96+
},
97+
{
98+
"name": "support.type.io",
99+
"match": "nil|null|true|false"
100+
},
101+
{
102+
"name": "support.function.io",
103+
"match": "\\b(method|block|interpolate|at|atPut|atInsert|with|println|print|run|do)\\b"
104+
},
105+
{
106+
"name": "support.function.error.io",
107+
"match": "\\b(raise)\\b"
108+
},
109+
{
110+
"name": "support.function.test.io",
111+
"match": "\\b(it|describe|expect|toBe|toEqual|toBeTrue|toBeFalse|toContain|toBeString|toBeNil|toThrowWithMessage|toThrowWithType|toThrow|toHaveSlot|toHaveBeenCalled|toHaveBeenCalledWith|beforeEach|afterEach)\\b"
112+
},
113+
{
114+
"name": "support.function.conditional.io",
115+
"match": "\\b(ifTrue|ifFalse|ifTrueIfFalse)\\b"
116+
},
117+
{
118+
"name": "support.function.casting.io",
119+
"match": "\\b(asCharacter|asString|asNumber|asMutable|asLowercase|asUppercase|asXML|makeFirstCharacterUppercase|lowercase|uppercase)\\b"
120+
},
121+
{
122+
"name": "support.function.slot.io",
123+
"match": "\\b(getSlot|setSlot|addSlot|hasSlot|slotNames)\\b"
124+
},
125+
{
126+
"name": "support.function.proto.io",
127+
"match": "\\b(setProtos|setProto|prependProto|appendProto)\\b"
128+
},
129+
{
130+
"name": "support.function.math.io",
131+
"match": "\\b(log|log10|mathematical|sqrt|exp|abs|sin|cos|tan|asin|acos|atan|round|floor|ceil|max|min)\\b"
132+
},
133+
{
134+
"name": "support.function.relational.io",
135+
"match": "\\b(super)\\b"
136+
},
137+
{
138+
"name": "support.function.compound.io",
139+
"match": "\\b(encoding|code|start|fetch|connect|now|year|month|day|hour|minute|second|close|exists|pop|push|join|first|last|keys|hasKey|values|reduce|reverse|reverseReduce|unique|elementsWithName|setItemType|itemType|attributes|sort|sortBy|serialize|slice|split|select|selectInPlace|size|setSize|indexOf|insertAt|flatten|list|vector|map|asyncSend|futureSend|resend|append|appendSeq|beginsWithSeq|betweenSeq|message|openForUpdating|createThread|streamTo|streamWrite|streamReadNextChunk|readBuffer|detect|wait|contains|containsSeq|remove|removeAt|removeFirst|removeLast|setPort|setHostName|argsEvaluatedIn|setPath|doFile|doRelativeFile|writeln|write|getScope|setScope|forwardTo)\\b"
140+
}
141+
]
142+
},
143+
"keywords": {
144+
"patterns": [
145+
{
146+
"name": "keyword.control.io",
147+
"match": "\\b(call|clone|init|return|yield|type|sender)\\b"
148+
},
149+
{
150+
"name": "keyword.control.error.io",
151+
"match": "\\b(try|catch|pass)\\b"
152+
},
153+
{
154+
"name": "keyword.control.test.io",
155+
"match": "\\b(suite|spec|specs)\\b"
156+
},
157+
{
158+
"name": "keyword.control.conditional.io",
159+
"match": "\\b(if|then|else)\\b"
160+
},
161+
{
162+
"name": "keyword.control.relational.io",
163+
"match": "\\b(self)\\b"
164+
},
165+
{
166+
"name": "keyword.control.loop.io",
167+
"match": "\\b(to|loop|repeat|redo|retry|while|for|foreach|reverseForeach|break|continue|pause|resume)\\b"
168+
},
169+
{
170+
"name": "keyword.operator.assignment.comparison.io",
171+
"match": "==|!="
172+
},
173+
{
174+
"name": "keyword.operator.assignment.relational.io",
175+
"match": ">=|<=|>|<"
176+
},
177+
{
178+
"name": "keyword.operator.assignment.logical.io",
179+
"match": "&&|\\!|\\|\\|"
180+
},
181+
{
182+
"name": "keyword.operator.assignment.io",
183+
"match": "\\=|::=|:="
184+
},
185+
{
186+
"name": "keyword.operator.bitwise.io",
187+
"match": "\\&|~|\\^|\\|"
188+
},
189+
{
190+
"name": "keyword.operator.decrement.io",
191+
"match": "--"
192+
},
193+
{
194+
"name": "keyword.operator.increment.io",
195+
"match": "\\+\\+"
196+
},
197+
{
198+
"name": "keyword.operator.arithmetic.io",
199+
"match": "%|\\*|/|-|\\+"
200+
},
201+
{
202+
"name": "keyword.operator.concat.io",
203+
"match": "\\.\\."
204+
},
205+
{
206+
"name": "keyword.operator.word.io",
207+
"match": "\b(and|or|not|yes|no)\b"
208+
}
209+
]
210+
},
211+
"strings": {
212+
"name": "string.quoted.io",
213+
"patterns": [
214+
{
215+
"include": "#string-quoted-double"
216+
},
217+
{
218+
"include": "#string-quoted-triple"
219+
}
220+
]
221+
},
222+
"class-identifier": {
223+
"patterns": [
224+
{
225+
"name": "support.class.identifier.io",
226+
"match": "\\b([[:upper:]](\\w+)?)\\b"
227+
}
228+
]
229+
},
230+
"function-identifier": {
231+
"patterns": [
232+
{
233+
"name": "support.function.identifier.io",
234+
"match": "\\b(\\w+(?=\\s*\\(\\)))\\b"
235+
}
236+
]
237+
},
238+
"string-quoted-double": {
239+
"name": "string.quoted.double.io",
240+
"begin": "\"",
241+
"beginCaptures": {
242+
"0": {
243+
"name": "punctuation.definition.string.begin.io"
244+
}
245+
},
246+
"end": "\"",
247+
"endCaptures": {
248+
"0": {
249+
"name": "punctuation.definition.string.end.io"
250+
}
251+
},
252+
"patterns": [
253+
{
254+
"include": "#string-interpolate"
255+
},
256+
{
257+
"include": "#string-escape"
258+
}
259+
]
260+
},
261+
"string-quoted-triple": {
262+
"name": "string.triple.double.io",
263+
"begin": "\"\"\"",
264+
"beginCaptures": {
265+
"0": {
266+
"name": "punctuation.definition.string.begin.io"
267+
}
268+
},
269+
"end": "\"\"\"",
270+
"endCaptures": {
271+
"0": {
272+
"name": "punctuation.definition.string.end.io"
273+
}
274+
},
275+
"patterns": [
276+
{
277+
"include": "#string-interpolate"
278+
},
279+
{
280+
"include": "#string-escape"
281+
}
282+
]
283+
},
284+
"string-escape": {
285+
"patterns": [
286+
{
287+
"name": "constant.character.escape.io",
288+
"match": "\\\\."
289+
}
290+
]
291+
},
292+
"string-interpolate": {
293+
"name": "meta.interpolate.expression.io",
294+
"begin": "#\\{",
295+
"beginCaptures": {
296+
"0": {
297+
"name": "punctuation.definition.expression.interpolate.begin.js"
298+
}
299+
},
300+
"end": "\\}",
301+
"endCaptures": {
302+
"0": {
303+
"name": "punctuation.definition.expression.interpolate.end.js"
304+
}
305+
},
306+
"patterns": [
307+
{
308+
"name": "variable.interpolate",
309+
"match": ".+(?=\\})"
310+
}
311+
]
312+
}
313+
}
314+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
// See: https://code.visualstudio.com/api/language-extensions/language-configuration-guide
3+
"comments": {
4+
"lineComment": "//",
5+
"blockComment": ["/*", "*/"]
6+
},
7+
"brackets": [
8+
["{", "}"],
9+
["[", "]"],
10+
["(", ")"]
11+
],
12+
// symbols that are auto closed when typing
13+
"autoClosingPairs": [
14+
{ "open": "{", "close": "}" },
15+
{ "open": "[", "close": "]" },
16+
{ "open": "(", "close": ")" },
17+
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
18+
{ "open": "\"", "close": "\"", "notIn": ["string"] },
19+
{ "open": "`", "close": "`", "notIn": ["string", "comment"] },
20+
{ "open": "/*", "close": " */", "notIn": ["string"] }
21+
],
22+
"autoCloseBefore": ";:.,=}])>` \n\t",
23+
"surroundingPairs": [
24+
["{", "}"],
25+
["[", "]"],
26+
["(", ")"],
27+
["\"", "\""],
28+
["'", "'"],
29+
["`", "`"]
30+
],
31+
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)"
32+
}

0 commit comments

Comments
 (0)