Skip to content

Commit 93eb32b

Browse files
OdinmylordTodePond
andauthored
added syntax highlight file (TodePond#145)
* added syntax highlight file * polish syntax highlighting wording * streamline wording --------- Co-authored-by: Lu[ke] Wilson <[email protected]>
1 parent 3edbc5d commit 93eb32b

File tree

2 files changed

+142
-4
lines changed

2 files changed

+142
-4
lines changed

.vscode/settings.json

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"highlight.regexFlags": "gi",
3+
"highlight.regexes": {
4+
"(?= *[functio])( )*(f?u?n?c?t?i?o?n?)+( *)([^()\n ]+)( *\\()(.*?)(\\) +=>)": {
5+
"decorations": [
6+
{}, //indentation
7+
{
8+
"color": "#ffff46" //function keyword
9+
},
10+
{},
11+
{
12+
"color": "#46ccff" //function name
13+
},
14+
{},
15+
{
16+
"color": "#8043f7" //function params
17+
},
18+
{}
19+
]
20+
},
21+
"const (const|var) +(var|(?!\\1)const)": {
22+
"decorations": [
23+
{
24+
"backgroundColor": "#ff4346", // this is to highlight an invalid usage of const const const
25+
"color": "#1f1f1f"
26+
},
27+
{}
28+
]
29+
},
30+
"(const|var)( +)(const|var)( +)([^ +\\-\\*\\/<>=\\(\\)\\[\\]!;:\\.{}\n]+)(([^ ]+?))?( *)([+\\-\\/*]?)(= *)([^!\n?]+)": {
31+
"decorations": [
32+
{
33+
"color": "#46ff80" // first const
34+
},
35+
{},
36+
{
37+
"color": "#4680ff" // second const
38+
},
39+
{},
40+
{
41+
"color": "#ff8046" // variable name
42+
},
43+
{
44+
"color": "#ff80de" //lifetime
45+
}
46+
]
47+
}
48+
}
49+
}

0 commit comments

Comments
 (0)