Skip to content

Commit 69ac974

Browse files
Merge pull request #21 from KaptainMicila/1.9.4-dev
1.9.4
2 parents c6eaf9d + 8283835 commit 69ac974

19 files changed

+417
-238
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
custom: ['https://www.buymeacoffee.com/KaptainMicila']
1+
buy_me_a_coffee: KaptainMicila

CHANGELOG.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
# Change Log
22

3+
## [1.9.4] The "I absolutely did NOT forget about this extension's existence" update
4+
- Added: support for "#region" blocks, due to GZDoom handling those
5+
- Added: support for "// region" and "// #region" comments blocks
6+
- Fixed: How the strings handled escaping sequences
7+
- Fixed: DECORATE aliased to ACS in the language selection menu, for some reason.
8+
- Fixed: char strings handled like normal strings
9+
- Fixed: "<" and ">" signs being threated as brackets even when used as operators
10+
311
## [1.9.3] The "Ternary" update
412
- Fixed: broken decimal point identification
513
- Fixed: `:` character making everything after it a class (even if they weren't)
6-
- Added: `?` to the operators list
14+
- Added: `?` to the operators' list
715

816
## [1.9.2] The "time goes on, but I'm still lazy" update
917
- Fixed: `NULL` was seen as a constant instead of a keyword (like `null` does)
@@ -12,21 +20,21 @@
1220
- Enhancing classes detection in `default` ([link](https://github.com/PROPHESSOR/GZDoom-Extension-VSCode/pull/7))
1321

1422
## [1.9.0] The "back to the roots" update
15-
- Deleted any trace of javascript, again.
23+
- Deleted any trace of JavaScript. Again.
1624
- Added syntax highlighting support for most [Special Lumps](https://zdoom.org/wiki/Special_lumps)
1725

1826
## [1.8.3] The "Bundler" update
1927
- Extension weights almost 13 MB less.
2028

2129
## [1.8.2] The "ZScript on the GO" update
2230

23-
- Restarted the project, again.
31+
- Restarted the project. Again.
2432
- Now the extension runs on the web version of vscode
2533

2634
## [1.8.0] The "Annother Rewrite" update
2735

2836
- Rewrote the whole thing for not murdering "VSCode & Co." with huge files (LOC > 1000) and to look actually decent
29-
- Sneak peek for auto-complete (working this time, I swear: you can even try it if you know how compile this mess)
37+
- Sneak peek for auto-complete (working this time, I swear: you can even try it if you know how to compile this mess)
3038
- Some other fixes (and bugs) I forgot during the rewrite.
3139

3240
## [1.7.6] The "Classed4Nobody" update
@@ -72,15 +80,15 @@
7280

7381
## [1.6.1] The "Comments have value" update
7482

75-
- Added comments support for file parsing (I'm gonna need it for context support)
83+
- Added comments support for file parsing (I'm going to need it for context support)
7684
- Added types for contextes (is it a class? An enum? A struct? ...)
7785
- Microfixes around the place
78-
- A little peek to what to do next (maybe)
86+
- A little peek at what to do next (maybe)
7987

8088
## [1.6.0] The "Kaptain can't program" update
8189

8290
- Small fixes about folding in both ZScript and ACS
83-
- Really broken "open and closed curly brackets" checking, for your class/enum/structs making pleasure.
91+
- Really broken "open and closed curly brackets" checking for your class/enum/structs making pleasure.
8492
- Soon™ to come.
8593

8694
## [1.5.0] The "Script Types" update
@@ -139,10 +147,10 @@ script "Whatever" ENTER //<-- this one
139147
- Fixed "states" block ending, as they can have "anonymous functions inside"
140148
- Upgraded performance thanks to some regex magic!
141149
- Updated class highlighting (example 2)
142-
- Fixed the `default` and `states` blocks detection, again. (They won't be found in comments anymore)
150+
- Fixed the `default` and `states` blocks detection, again. (They won't be found in comments any more)
143151
- Fixed `default` blocks getting called `decorate` blocks in the token view
144152
- Removed a lot of hardcoded stuff
145-
- Changed highlighting type from `class` to `tag` for `Default` blocks' attributes
153+
- Changed the highlighting type from `class` to `tag` for `Default` blocks' attributes
146154
- Added enum support (example 3, but was it really required?)
147155

148156
Examples:

README.md

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<p align="center"><img width="100" height="100" src="./icons/GZDoom.png"></p>
1+
<p align="center"><img width="256" height="256" src="./icons/GZDoom.png" alt="GZDoom logo" style="min-width: 128px; max-width: 128px; min-height: 128px; max-height: 128px;"></p>
22
<h1 align="center">ZScript-VSCode</h1>
33

44
<p align="center">
@@ -10,13 +10,16 @@
1010

1111
## [GZDoom's](https://zdoom.org/index) [ZScript](https://zdoom.org/wiki/ZScript) language support for [VSCode](https://code.visualstudio.com/) (and compatible editors).
1212

13-
Made with the help from: [marrub--'s ZScript documentation](https://github.com/marrub--/zdoom-doc).
13+
Made with the help from:
14+
15+
- [marrub--'s ZScript documentation](https://github.com/marrub--/zdoom-doc).
16+
- Every single other GZDoom modder
1417

1518
---
1619

1720
## FEATURES
1821

19-
- Syntax highlighting for many languages needed for GZDoom modding
22+
- Syntax highlighting for many languages needed for GZDoom modding
2023

2124
---
2225

@@ -32,14 +35,15 @@ archvile.zs (from gzdoom.pk3)
3235

3336
### PREREQUISITES
3437

35-
- [Visual Studio Code](https://code.visualstudio.com/Download)
38+
- [Visual Studio Code](https://code.visualstudio.com/Download)
39+
- Or some other editor that supports Visual Studio Code's extensions
3640

3741
### FOR VERSIONS >= 0.9.0
3842

39-
- Get the .vsix from the ["Releases" page](https://github.com/KaptainMicila/ZScript-VSCode/releases)
40-
- Open VSCode
41-
- Press "Ctrl + Shift + p"
42-
- Type "Extension: install from VSIX"
43+
- Get the .vsix from the ["Releases" page](https://github.com/KaptainMicila/ZScript-VSCode/releases)
44+
- Open VSCode
45+
- Press "Ctrl + Shift + p"
46+
- Type "Extension: install from VSIX"
4347

4448
### FOR VERSIONS >=1.0.0
4549

@@ -55,11 +59,27 @@ Get it from [Open VSX Registry](https://open-vsx.org/extension/kaptainmicila/gzd
5559

5660
---
5761

62+
## CONTRIBUTING
63+
64+
Just clone the repo.
65+
66+
This extension doesn't even use Node.js features, so you don't even
67+
need to `npm install` this.
68+
69+
> Please contribute only regex rules / language configurations or
70+
> anything that isn't related to programmatic features.
71+
>
72+
> Those are better put in a separate extension, and I would be grateful
73+
> if you took merit for your own things instead of giving such
74+
> responsibility to me.
75+
76+
---
77+
5878
## SPECIAL THANKS
5979

60-
- [Nash Muhandes](https://github.com/nashmuhandes) for giving me the will to make this syntax highlighter;
61-
- [marrub--](https://github.com/marrub--) for the ZScript documentation;
62-
- [Microsoft](www.microsoft.com) for making VSCode;
63-
- [The ZDoom comunity](https://zdoom.org/index) for creating the source port;
80+
- [Nash Muhandes](https://github.com/nashmuhandes) for giving me the will to make this syntax highlighter;
81+
- [marrub--](https://github.com/marrub--) for the ZScript documentation;
82+
- [Microsoft](https://www.microsoft.com) for making VSCode;
83+
- [The ZDoom comunity](https://zdoom.org/index) for creating the source port;
6484

6585
---

configurations/ACSConfiguration.json

Lines changed: 28 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,60 @@
11
{
22
"comments": {
33
"lineComment": "//",
4-
"blockComment": [
5-
"/*",
6-
"*/"
7-
]
4+
"blockComment": ["/*", "*/"]
85
},
96
"brackets": [
10-
[
11-
"{",
12-
"}"
13-
],
14-
[
15-
"[",
16-
"]"
17-
],
18-
[
19-
"(",
20-
")"
21-
]
7+
["{", "}"],
8+
["[", "]"],
9+
["(", ")"]
2210
],
2311
"autoClosingPairs": [
2412
{
2513
"open": "{",
2614
"close": "}",
27-
"notIn": [
28-
"comment",
29-
"string"
30-
]
15+
"notIn": ["comment", "string"]
3116
},
3217
{
3318
"open": "[",
3419
"close": "]",
35-
"notIn": [
36-
"comment",
37-
"string"
38-
]
20+
"notIn": ["comment", "string"]
21+
3922
},
4023
{
4124
"open": "(",
4225
"close": ")",
43-
"notIn": [
44-
"comment",
45-
"string"
46-
]
26+
"notIn": ["comment", "string"]
27+
4728
},
4829
{
4930
"open": "\"",
5031
"close": "\"",
51-
"notIn": [
52-
"comment",
53-
"string"
54-
]
32+
"notIn": ["comment", "string"]
33+
5534
},
5635
{
5736
"open": "'",
5837
"close": "'",
59-
"notIn": [
60-
"comment",
61-
"string"
62-
]
38+
"notIn": ["comment", "string"]
6339
}
6440
],
41+
"autoCloseBefore": ";:.,=}])>` \n\t",
6542
"surroundingPairs": [
66-
{
67-
"open": "{",
68-
"close": "}"
69-
},
70-
{
71-
"open": "[",
72-
"close": "]"
73-
},
74-
{
75-
"open": "(",
76-
"close": ")"
77-
},
78-
{
79-
"open": "\"",
80-
"close": "\""
81-
},
82-
{
83-
"open": "'",
84-
"close": "'"
85-
}
43+
["{", "}"],
44+
["[", "]"],
45+
["(", ")"],
46+
["'", "'"],
47+
["\"", "\""]
8648
],
49+
"folding": {
50+
"markers": {
51+
"start": "^\\s*(//\\s*)?(\\#)?region\\b",
52+
"end": "^\\s*(//\\s*)?(\\#)?endregion\\b"
53+
}
54+
},
55+
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)",
8756
"indentationRules": {
88-
"increaseIndentPattern": "[{}]"
57+
"increaseIndentPattern": "^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$",
58+
"decreaseIndentPattern": "^((?!.*?\\/\\*).*\\*/)?\\s*[\\)\\}\\]].*$"
8959
}
90-
}
60+
}
Lines changed: 25 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,57 @@
11
{
22
"comments": {
33
"lineComment": "//",
4-
"blockComment": [
5-
"/*",
6-
"*/"
7-
]
4+
"blockComment": ["/*", "*/"]
85
},
96
"brackets": [
10-
[
11-
"{",
12-
"}"
13-
],
14-
[
15-
"[",
16-
"]"
17-
],
18-
[
19-
"(",
20-
")"
21-
]
7+
["{", "}"],
8+
["[", "]"],
9+
["(", ")"]
2210
],
2311
"autoClosingPairs": [
2412
{
2513
"open": "{",
2614
"close": "}",
27-
"notIn": [
28-
"comment",
29-
"string"
30-
]
15+
"notIn": ["comment", "string"]
3116
},
3217
{
3318
"open": "[",
3419
"close": "]",
35-
"notIn": [
36-
"comment",
37-
"string"
38-
]
20+
"notIn": ["comment", "string"]
3921
},
4022
{
4123
"open": "(",
4224
"close": ")",
43-
"notIn": [
44-
"comment",
45-
"string"
46-
]
25+
"notIn": ["comment", "string"]
4726
},
4827
{
4928
"open": "\"",
5029
"close": "\"",
51-
"notIn": [
52-
"comment",
53-
"string"
54-
]
30+
"notIn": ["comment", "string"]
5531
},
5632
{
5733
"open": "'",
5834
"close": "'",
59-
"notIn": [
60-
"comment",
61-
"string"
62-
]
35+
"notIn": ["comment", "string"]
6336
}
6437
],
38+
"autoCloseBefore": ";:.,=}])>` \n\t",
6539
"surroundingPairs": [
66-
{
67-
"open": "{",
68-
"close": "}"
69-
},
70-
{
71-
"open": "[",
72-
"close": "]"
73-
},
74-
{
75-
"open": "(",
76-
"close": ")"
77-
},
78-
{
79-
"open": "\"",
80-
"close": "\""
81-
},
82-
{
83-
"open": "'",
84-
"close": "'"
85-
}
40+
["{", "}"],
41+
["[", "]"],
42+
["(", ")"],
43+
["'", "'"],
44+
["\"", "\""]
8645
],
46+
"folding": {
47+
"markers": {
48+
"start": "^\\s*(//\\s*)?(\\#)?region\\b",
49+
"end": "^\\s*(//\\s*)?(\\#)?endregion\\b"
50+
}
51+
},
52+
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)",
8753
"indentationRules": {
88-
"increaseIndentPattern": "[{}]"
54+
"increaseIndentPattern": "^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$",
55+
"decreaseIndentPattern": "^((?!.*?\\/\\*).*\\*/)?\\s*[\\)\\}\\]].*$"
8956
}
90-
}
57+
}

0 commit comments

Comments
 (0)