Skip to content

Commit

Permalink
Release v0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmwyant committed Feb 4, 2021
2 parents cc59d22 + c7357c2 commit be86ddf
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 15 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes will be documented in this file.

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

## [v0.1.2] - 2021-02-03

### Changed

- 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.

- 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.

- 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.

## [v0.1.1] - 2020-11-13

### Chagned
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Addding, updating, or removing line numbers are not tasks you should ever need t

<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>

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.
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.

## 📓 Release Notes

Expand Down
64 changes: 53 additions & 11 deletions assets/gcode.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@
},
{
"name": "word.n.gcode",
"match": "^(N)(\\d{1,5}|[A-Z][A-Z0-9]{0,4})(?=\\s|$|\\()"
"match": "^(N)(\\d{1,5}|[A-Z][A-Z0-9]{0,4})(?=\\s|$|\\()",
"captures": {
"0": {
"name": "punctuation.definition.tag"
}
}
}
]
},
Expand All @@ -137,19 +142,29 @@
},
{
"name": "word.m.gcode",
"match": "M(\\d{1,3}|(?=\\=))"
"match": "M(\\d{1,3}|(?=\\=))",
"captures": {
"0": {
"name": "constant.character.escape"
}
}
},
{
"name": "word.t.gcode",
"match": "T(\\d+|(?=\\=))"
"match": "T(\\d+|(?=\\=))",
"captures": {
"0": {
"name": "string"
}
}
}
]
},
"address-decimal": {
"comment": "A single letter followed by a signed number, integer or decimal",
"patterns": [
{
"match": "([ABCEFIJKLPQRSUVWXYZ])([\\-\\+]?\\d+\\.?\\d*|\\.\\d+|(?=\\=))",
"match": "([ABCEFIJKLPQRSUVWXYZ])([\\-\\+]?\\d{0,6}\\.?\\d*|\\.\\d+|(?=\\=))",
"captures": {
"0": {
"patterns": [
Expand All @@ -171,7 +186,12 @@
},
{
"name": "word.f.gcode",
"match": "F.*"
"match": "F.*",
"captures": {
"0": {
"name": "string"
}
}
},
{
"name": "word.i.gcode",
Expand Down Expand Up @@ -203,7 +223,12 @@
},
{
"name": "word.s.gcode",
"match": "S.*"
"match": "S.*",
"captures": {
"0": {
"name": "string"
}
}
},
{
"name": "word.u.gcode",
Expand All @@ -219,15 +244,30 @@
},
{
"name": "word.x.gcode",
"match": "X.*"
"match": "X.*",
"captures": {
"0": {
"name": "string.regexp"
}
}
},
{
"name": "word.y.gcode",
"match": "Y.*"
"match": "Y.*",
"captures": {
"0": {
"name": "comment"
}
}
},
{
"name": "word.z.gcode",
"match": "Z.*"
"match": "Z.*",
"captures": {
"0": {
"name": "constant.language"
}
}
}
]
}
Expand All @@ -240,12 +280,14 @@
{
"name": "comment.parens.gcode",
"begin": "\\(",
"end": "\\)"
"end": "\\)",
"contentName": "punctuation.definition.tag"
},
{
"name": "comment.semi-colon.gcode",
"begin": "\\;",
"end": "$"
"end": "$",
"contentName": "punctuation.definition.tag"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "gcode",
"displayName": "G-Code",
"description": "The premier Visual Studio Code extension for G-Code",
"version": "0.1.1",
"version": "0.1.2",
"preview": true,
"author": {
"name": "Scott M. Wyant",
Expand Down Expand Up @@ -114,7 +114,7 @@
},
{
"command": "gcode.tailorTextMateGrammar",
"title": "Colorize",
"title": "Adapt to Current Theme",
"category": "G-Code"
}
],
Expand Down
2 changes: 1 addition & 1 deletion src/grammar/gcode.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
"comment": "A single letter followed by a signed number, integer or decimal",
"patterns": [
{
"match": "([ABCEFIJKLPQRSUVWXYZ])([\\-\\+]?\\d+\\.?\\d*|\\.\\d+|(?=\\=))",
"match": "([ABCEFIJKLPQRSUVWXYZ])([\\-\\+]?\\d{0,6}\\.?\\d*|\\.\\d+|(?=\\=))",
"captures": {
"0": {
"patterns": [
Expand Down

0 comments on commit be86ddf

Please sign in to comment.