Skip to content

Commit 55eb5fd

Browse files
committed
feat: Add initial VS Code extension for ProXPL language support, including syntax highlighting, custom icons, and basic commands.
1 parent 3cabd1a commit 55eb5fd

4 files changed

Lines changed: 87 additions & 8 deletions

File tree

extension/icons/icon-theme.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"iconDefinitions": {
3+
"_proxpl": {
4+
"iconPath": "./proxpl.svg"
5+
}
6+
},
7+
"fileExtensions": {
8+
"prox": "_proxpl",
9+
"pxpl": "_proxpl"
10+
},
11+
"languageIds": {
12+
"proxpl": "_proxpl"
13+
}
14+
}

extension/icons/proxpl.svg

Lines changed: 6 additions & 0 deletions
Loading

extension/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@
6060
"path": "./snippets/proxpl-snippets.json"
6161
}
6262
],
63+
"iconThemes": [
64+
{
65+
"id": "proxpl-icons",
66+
"label": "ProXPL Icons",
67+
"path": "./icons/icon-theme.json"
68+
}
69+
],
6370
"commands": [
6471
{
6572
"command": "proxpl.run",

extension/syntaxes/proxpl.tmLanguage.json

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
{
1010
"include": "#keywords"
1111
},
12+
{
13+
"include": "#storage"
14+
},
1215
{
1316
"include": "#types"
1417
},
@@ -26,6 +29,12 @@
2629
},
2730
{
2831
"include": "#functions"
32+
},
33+
{
34+
"include": "#classes"
35+
},
36+
{
37+
"include": "#constants"
2938
}
3039
],
3140
"repository": {
@@ -46,19 +55,35 @@
4655
"patterns": [
4756
{
4857
"name": "keyword.control.proxpl",
49-
"match": "\\b(if|else|while|for|return|use)\\b"
58+
"match": "\\b(if|else|while|for|return|break|continue|switch|case|default|try|catch|finally|throw|await|async|defer|use|from|export)\\b"
59+
},
60+
{
61+
"name": "keyword.operator.new.proxpl",
62+
"match": "\\b(new|in|is|as|typeof|extends|implements)\\b"
5063
},
5164
{
52-
"name": "keyword.declaration.proxpl",
53-
"match": "\\b(var|func)\\b"
65+
"name": "variable.language.this.proxpl",
66+
"match": "\\b(this|super)\\b"
5467
}
5568
]
5669
},
57-
"types": {
70+
"storage": {
5871
"patterns": [
5972
{
6073
"name": "storage.type.proxpl",
61-
"match": "\\b(int|float|string|bool)\\b"
74+
"match": "\\b(let|const|var|func|class|struct|interface|enum)\\b"
75+
},
76+
{
77+
"name": "storage.modifier.proxpl",
78+
"match": "\\b(public|private|protected|static|abstract|native|async)\\b"
79+
}
80+
]
81+
},
82+
"types": {
83+
"patterns": [
84+
{
85+
"name": "storage.type.primitive.proxpl",
86+
"match": "\\b(void|int|float|string|bool)\\b"
6287
}
6388
]
6489
},
@@ -80,24 +105,36 @@
80105
"numbers": {
81106
"patterns": [
82107
{
83-
"name": "constant.numeric.proxpl",
108+
"name": "constant.numeric.hex.proxpl",
109+
"match": "\\b0x[a-fA-F0-9]+\\b"
110+
},
111+
{
112+
"name": "constant.numeric.decimal.proxpl",
84113
"match": "\\b[0-9]+(\\.[0-9]+)?\\b"
85114
}
86115
]
87116
},
88117
"booleans": {
89118
"patterns": [
90119
{
91-
"name": "constant.language.proxpl",
120+
"name": "constant.language.boolean.proxpl",
92121
"match": "\\b(true|false)\\b"
93122
}
94123
]
95124
},
125+
"constants": {
126+
"patterns": [
127+
{
128+
"name": "constant.language.null.proxpl",
129+
"match": "\\b(null)\\b"
130+
}
131+
]
132+
},
96133
"operators": {
97134
"patterns": [
98135
{
99136
"name": "keyword.operator.proxpl",
100-
"match": "(\\+|\\-|\\*|\\/|==|!=|>|<|=)"
137+
"match": "(\\+|\\-|\\*|\\/|%|\\^|&|\\||!|==|!=|>|<|=)"
101138
}
102139
]
103140
},
@@ -112,6 +149,21 @@
112149
"match": "\\b(print)\\b"
113150
}
114151
]
152+
},
153+
"classes": {
154+
"patterns": [
155+
{
156+
"match": "\\b(class|struct|interface|enum)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
157+
"captures": {
158+
"1": {
159+
"name": "storage.type.proxpl"
160+
},
161+
"2": {
162+
"name": "entity.name.type.class.proxpl"
163+
}
164+
}
165+
}
166+
]
115167
}
116168
}
117169
}

0 commit comments

Comments
 (0)