Skip to content

Commit be86ddf

Browse files
committed
Release v0.1.2
2 parents cc59d22 + c7357c2 commit be86ddf

File tree

5 files changed

+67
-15
lines changed

5 files changed

+67
-15
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ All notable changes will be documented in this file.
44

55
Contributors: This document uses style guidelines from [Keep A Changelog](http://keepachangelog.com/).
66

7+
## [v0.1.2] - 2021-02-03
8+
9+
### Changed
10+
11+
- The syntax colorization that ships with the extension is now set to match VS Code's default theme. Previously, the extension installed with the (unreasonable) expectation that the 'One Dark Pro' theme was being used.
12+
13+
- Fixed a bug that would prevent a negative value with no number left of the decimal from being recognized as an axis address. Now, words like `X-.3536` won't be overlooked.
14+
15+
- The documentation provided with the extension, README.md, references a command `G-Code: Adapt to Current Theme`. The functionality described in the readme was intact but under a command with a different name. The command was renamed to match the documentation.
16+
717
## [v0.1.1] - 2020-11-13
818

919
### Chagned

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Addding, updating, or removing line numbers are not tasks you should ever need t
8080

8181
<p align="center"><img src="https://user-images.githubusercontent.com/29161635/99023050-cf829980-2531-11eb-92be-b4516f3b4e95.gif" alt="icon" height="400px" width="500px"></p>
8282

83-
VS Code ships with the ability to toggle comments. The built-in feature works by modifying one or more characters at the beginning of each selected line. Since it only affects the beginning of the line, it doesn't work for G-Code comments that need to be (in parentheses). The G-Code extension provides a command that will toggle parenthesis at the start and end of each selected line.
83+
VS Code ships with the ability to toggle comments. The built-in feature works by modifying one or more characters at the beginning of each selected line. Since it only affects the beginning of the line, it doesn't work for G-Code comments that need to be (in parentheses). The G-Code extension provides a command that will toggle parentheses at the start and end of each selected line.
8484

8585
## 📓 Release Notes
8686

assets/gcode.tmLanguage.json

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,12 @@
124124
},
125125
{
126126
"name": "word.n.gcode",
127-
"match": "^(N)(\\d{1,5}|[A-Z][A-Z0-9]{0,4})(?=\\s|$|\\()"
127+
"match": "^(N)(\\d{1,5}|[A-Z][A-Z0-9]{0,4})(?=\\s|$|\\()",
128+
"captures": {
129+
"0": {
130+
"name": "punctuation.definition.tag"
131+
}
132+
}
128133
}
129134
]
130135
},
@@ -137,19 +142,29 @@
137142
},
138143
{
139144
"name": "word.m.gcode",
140-
"match": "M(\\d{1,3}|(?=\\=))"
145+
"match": "M(\\d{1,3}|(?=\\=))",
146+
"captures": {
147+
"0": {
148+
"name": "constant.character.escape"
149+
}
150+
}
141151
},
142152
{
143153
"name": "word.t.gcode",
144-
"match": "T(\\d+|(?=\\=))"
154+
"match": "T(\\d+|(?=\\=))",
155+
"captures": {
156+
"0": {
157+
"name": "string"
158+
}
159+
}
145160
}
146161
]
147162
},
148163
"address-decimal": {
149164
"comment": "A single letter followed by a signed number, integer or decimal",
150165
"patterns": [
151166
{
152-
"match": "([ABCEFIJKLPQRSUVWXYZ])([\\-\\+]?\\d+\\.?\\d*|\\.\\d+|(?=\\=))",
167+
"match": "([ABCEFIJKLPQRSUVWXYZ])([\\-\\+]?\\d{0,6}\\.?\\d*|\\.\\d+|(?=\\=))",
153168
"captures": {
154169
"0": {
155170
"patterns": [
@@ -171,7 +186,12 @@
171186
},
172187
{
173188
"name": "word.f.gcode",
174-
"match": "F.*"
189+
"match": "F.*",
190+
"captures": {
191+
"0": {
192+
"name": "string"
193+
}
194+
}
175195
},
176196
{
177197
"name": "word.i.gcode",
@@ -203,7 +223,12 @@
203223
},
204224
{
205225
"name": "word.s.gcode",
206-
"match": "S.*"
226+
"match": "S.*",
227+
"captures": {
228+
"0": {
229+
"name": "string"
230+
}
231+
}
207232
},
208233
{
209234
"name": "word.u.gcode",
@@ -219,15 +244,30 @@
219244
},
220245
{
221246
"name": "word.x.gcode",
222-
"match": "X.*"
247+
"match": "X.*",
248+
"captures": {
249+
"0": {
250+
"name": "string.regexp"
251+
}
252+
}
223253
},
224254
{
225255
"name": "word.y.gcode",
226-
"match": "Y.*"
256+
"match": "Y.*",
257+
"captures": {
258+
"0": {
259+
"name": "comment"
260+
}
261+
}
227262
},
228263
{
229264
"name": "word.z.gcode",
230-
"match": "Z.*"
265+
"match": "Z.*",
266+
"captures": {
267+
"0": {
268+
"name": "constant.language"
269+
}
270+
}
231271
}
232272
]
233273
}
@@ -240,12 +280,14 @@
240280
{
241281
"name": "comment.parens.gcode",
242282
"begin": "\\(",
243-
"end": "\\)"
283+
"end": "\\)",
284+
"contentName": "punctuation.definition.tag"
244285
},
245286
{
246287
"name": "comment.semi-colon.gcode",
247288
"begin": "\\;",
248-
"end": "$"
289+
"end": "$",
290+
"contentName": "punctuation.definition.tag"
249291
}
250292
]
251293
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "gcode",
44
"displayName": "G-Code",
55
"description": "The premier Visual Studio Code extension for G-Code",
6-
"version": "0.1.1",
6+
"version": "0.1.2",
77
"preview": true,
88
"author": {
99
"name": "Scott M. Wyant",
@@ -114,7 +114,7 @@
114114
},
115115
{
116116
"command": "gcode.tailorTextMateGrammar",
117-
"title": "Colorize",
117+
"title": "Adapt to Current Theme",
118118
"category": "G-Code"
119119
}
120120
],

src/grammar/gcode.tmLanguage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
"comment": "A single letter followed by a signed number, integer or decimal",
165165
"patterns": [
166166
{
167-
"match": "([ABCEFIJKLPQRSUVWXYZ])([\\-\\+]?\\d+\\.?\\d*|\\.\\d+|(?=\\=))",
167+
"match": "([ABCEFIJKLPQRSUVWXYZ])([\\-\\+]?\\d{0,6}\\.?\\d*|\\.\\d+|(?=\\=))",
168168
"captures": {
169169
"0": {
170170
"patterns": [

0 commit comments

Comments
 (0)