Skip to content

Commit bf3ccfa

Browse files
committed
feat: sac-format color highlight, blue logo for formatter/config file icons
fix: also start extension features if `.sac-format` is first open file (so not only on `.sac`)
1 parent 37da615 commit bf3ccfa

10 files changed

Lines changed: 245 additions & 53 deletions

icons/logo-blue.png

13.5 KB
Loading

icons/logo-outline.png

13 KB
Loading

icons/sac-icon-theme.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
{
22
"iconDefinitions": {
33
"_file_sac": {
4-
"iconPath": "./logo.png"
4+
"iconPath": "./logo-outline.png"
5+
},
6+
"_file_sac_format": {
7+
"iconPath": "./logo-blue.png"
58
}
69
},
710
"fileExtensions": {
811
"sac": "_file_sac"
12+
},
13+
"fileNames": {
14+
".sac-format": "_file_sac_format"
915
}
10-
}
16+
}

package.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
],
4040
"main": "./out/extension.js",
4141
"activationEvents": [
42+
"onLanguage:sac",
43+
"onLanguage:sac-format",
4244
"onChatParticipant:sac-language-support.sac"
4345
],
4446
"engines": {
@@ -83,7 +85,8 @@
8385
"id": "sac",
8486
"aliases": [
8587
"SaC",
86-
"sac"
88+
"sac",
89+
"Single-assignment C"
8790
],
8891
"extensions": [
8992
".sac"
@@ -94,7 +97,8 @@
9497
"id": "sac-format",
9598
"aliases": [
9699
"SaC Format",
97-
"sac-format"
100+
"sac-format",
101+
"Single-assignment C Format Config"
98102
],
99103
"filenames": [
100104
".sac-format"
@@ -120,14 +124,6 @@
120124
"path": "./syntaxes/sac-format.tmLanguage.json"
121125
}
122126
],
123-
"fileIcons": [
124-
{
125-
"extensions": [
126-
"sac"
127-
],
128-
"icon": "./icons/logo.png"
129-
}
130-
],
131127
"snippets": [
132128
{
133129
"language": "sac",

syntaxes/sac-format.tmLanguage.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@
1212
"name": "comment.line.double-dash.sac-format",
1313
"match": "#.*$"
1414
},
15+
{
16+
"name": "meta.key-value.valid.sac-format",
17+
"match": "^\\s*(IndentSize|NormalizeGuards|ExpandInlineWithLoops|ExpandInlineComprehensions|SplitInlineGuards)\\s*(:)\\s*(.*)$",
18+
"captures": {
19+
"1": {
20+
"name": "variable.parameter.sac-format"
21+
},
22+
"2": {
23+
"name": "punctuation.separator.key-value.sac-format"
24+
},
25+
"3": {
26+
"name": "string.unquoted.value.sac-format"
27+
}
28+
}
29+
},
1530
{
1631
"name": "meta.key-value.sac-format",
1732
"match": "^\\s*([A-Za-z][A-Za-z0-9]*)\\s*(:)\\s*(.*)$",
@@ -28,4 +43,4 @@
2843
}
2944
}
3045
]
31-
}
46+
}

themes/sac-color-theme-cool.json

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,46 @@
1010
}
1111
},
1212
{
13-
"scope": ["comment", "punctuation.definition.comment"],
13+
"scope": [
14+
"comment",
15+
"punctuation.definition.comment"
16+
],
1417
"settings": {
1518
"foreground": "#4B5563"
1619
}
1720
},
1821
{
19-
"scope": ["string", "punctuation.definition.string"],
22+
"scope": [
23+
"string",
24+
"punctuation.definition.string"
25+
],
2026
"settings": {
2127
"foreground": "#93E9F0"
2228
}
2329
},
2430
{
25-
"scope": ["constant.numeric", "constant.language"],
31+
"scope": [
32+
"constant.numeric",
33+
"constant.language"
34+
],
2635
"settings": {
2736
"foreground": "#A5E3FF"
2837
}
2938
},
3039
{
31-
"scope": ["keyword", "storage"],
40+
"scope": [
41+
"keyword",
42+
"storage"
43+
],
3244
"settings": {
3345
"foreground": "#60A5FF"
3446
}
3547
},
3648
{
37-
"scope": ["entity.name.function", "support.function"],
49+
"scope": [
50+
"entity.name.function",
51+
"support.function"
52+
],
3853
"settings": {
3954
"foreground": "#BFE4FF"
4055
}
@@ -53,7 +68,10 @@
5368
}
5469
},
5570
{
56-
"scope": ["entity.name.type", "support.type"],
71+
"scope": [
72+
"entity.name.type",
73+
"support.type"
74+
],
5775
"settings": {
5876
"foreground": "#7DD3FC"
5977
}
@@ -165,10 +183,27 @@
165183
}
166184
},
167185
{
168-
"scope": ["punctuation.section.brackets.begin.sac", "punctuation.section.brackets.end.sac", "punctuation.separator.comma.sac"],
186+
"scope": [
187+
"punctuation.section.brackets.begin.sac",
188+
"punctuation.section.brackets.end.sac",
189+
"punctuation.separator.comma.sac"
190+
],
169191
"settings": {
170192
"foreground": "#93C5FF"
171193
}
194+
},
195+
{
196+
"scope": "variable.parameter.sac-format",
197+
"settings": {
198+
"foreground": "#7DD3FC",
199+
"fontStyle": "bold"
200+
}
201+
},
202+
{
203+
"scope": "variable.other.property.sac-format",
204+
"settings": {
205+
"foreground": "#9A9A9A"
206+
}
172207
}
173208
]
174-
}
209+
}

themes/sac-color-theme-default.json

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,46 @@
1010
}
1111
},
1212
{
13-
"scope": ["comment", "punctuation.definition.comment"],
13+
"scope": [
14+
"comment",
15+
"punctuation.definition.comment"
16+
],
1417
"settings": {
1518
"foreground": "#57A64A"
1619
}
1720
},
1821
{
19-
"scope": ["string", "punctuation.definition.string"],
22+
"scope": [
23+
"string",
24+
"punctuation.definition.string"
25+
],
2026
"settings": {
2127
"foreground": "#CE9178"
2228
}
2329
},
2430
{
25-
"scope": ["constant.numeric", "constant.language"],
31+
"scope": [
32+
"constant.numeric",
33+
"constant.language"
34+
],
2635
"settings": {
2736
"foreground": "#B5CEA8"
2837
}
2938
},
3039
{
31-
"scope": ["keyword", "storage"],
40+
"scope": [
41+
"keyword",
42+
"storage"
43+
],
3244
"settings": {
3345
"foreground": "#D8A0DF"
3446
}
3547
},
3648
{
37-
"scope": ["entity.name.function", "support.function"],
49+
"scope": [
50+
"entity.name.function",
51+
"support.function"
52+
],
3853
"settings": {
3954
"foreground": "#DCDCAA"
4055
}
@@ -53,7 +68,10 @@
5368
}
5469
},
5570
{
56-
"scope": ["entity.name.type", "support.type"],
71+
"scope": [
72+
"entity.name.type",
73+
"support.type"
74+
],
5775
"settings": {
5876
"foreground": "#569CD6"
5977
}
@@ -139,6 +157,19 @@
139157
"foreground": "#569CD6"
140158
}
141159
},
160+
{
161+
"scope": "variable.parameter.sac-format",
162+
"settings": {
163+
"foreground": "#569CD6",
164+
"fontStyle": "bold"
165+
}
166+
},
167+
{
168+
"scope": "variable.other.property.sac-format",
169+
"settings": {
170+
"foreground": "#9A9A9A"
171+
}
172+
},
142173
{
143174
"scope": "variable.parameter.rank.sac",
144175
"settings": {
@@ -165,10 +196,14 @@
165196
}
166197
},
167198
{
168-
"scope": ["punctuation.section.brackets.begin.sac", "punctuation.section.brackets.end.sac", "punctuation.separator.comma.sac"],
199+
"scope": [
200+
"punctuation.section.brackets.begin.sac",
201+
"punctuation.section.brackets.end.sac",
202+
"punctuation.separator.comma.sac"
203+
],
169204
"settings": {
170205
"foreground": "#DADADA"
171206
}
172207
}
173208
]
174-
}
209+
}

themes/sac-color-theme-vibrant.json

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,46 @@
1010
}
1111
},
1212
{
13-
"scope": ["comment", "punctuation.definition.comment"],
13+
"scope": [
14+
"comment",
15+
"punctuation.definition.comment"
16+
],
1417
"settings": {
1518
"foreground": "#6B7C59"
1619
}
1720
},
1821
{
19-
"scope": ["string", "punctuation.definition.string"],
22+
"scope": [
23+
"string",
24+
"punctuation.definition.string"
25+
],
2026
"settings": {
2127
"foreground": "#C3FF99"
2228
}
2329
},
2430
{
25-
"scope": ["constant.numeric", "constant.language"],
31+
"scope": [
32+
"constant.numeric",
33+
"constant.language"
34+
],
2635
"settings": {
2736
"foreground": "#E4FF88"
2837
}
2938
},
3039
{
31-
"scope": ["keyword", "storage"],
40+
"scope": [
41+
"keyword",
42+
"storage"
43+
],
3244
"settings": {
3345
"foreground": "#BBFF00"
3446
}
3547
},
3648
{
37-
"scope": ["entity.name.function", "support.function"],
49+
"scope": [
50+
"entity.name.function",
51+
"support.function"
52+
],
3853
"settings": {
3954
"foreground": "#EAFF99"
4055
}
@@ -53,7 +68,10 @@
5368
}
5469
},
5570
{
56-
"scope": ["entity.name.type", "support.type"],
71+
"scope": [
72+
"entity.name.type",
73+
"support.type"
74+
],
5775
"settings": {
5876
"foreground": "#CCFF66"
5977
}
@@ -165,10 +183,27 @@
165183
}
166184
},
167185
{
168-
"scope": ["punctuation.section.brackets.begin.sac", "punctuation.section.brackets.end.sac", "punctuation.separator.comma.sac"],
186+
"scope": [
187+
"punctuation.section.brackets.begin.sac",
188+
"punctuation.section.brackets.end.sac",
189+
"punctuation.separator.comma.sac"
190+
],
169191
"settings": {
170192
"foreground": "#D9FF88"
171193
}
194+
},
195+
{
196+
"scope": "variable.parameter.sac-format",
197+
"settings": {
198+
"foreground": "#BBFF00",
199+
"fontStyle": "bold"
200+
}
201+
},
202+
{
203+
"scope": "variable.other.property.sac-format",
204+
"settings": {
205+
"foreground": "#9A9A9A"
206+
}
172207
}
173208
]
174-
}
209+
}

0 commit comments

Comments
 (0)