diff --git a/CHANGELOG.md b/CHANGELOG.md index 1283b68..9bed4fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v2.1.17 + +- Syntax highlight for Ston + ## v2.1.16 - Native Test integration diff --git a/package.json b/package.json index 6f059ff..6eb7180 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Highlighting, Auto-completion, Execution, ...", "author": "BenoƮt Verhaeghe", "license": "MIT", - "version": "2.1.16", + "version": "2.1.17", "icon": "icon.png", "repository": { "type": "git", @@ -21,7 +21,8 @@ ], "keywords": [ "pharo", - "smalltalk" + "smalltalk", + "ston" ], "engines": { "vscode": "^1.76.0" @@ -161,6 +162,20 @@ "light": "./media/moose-logo.svg", "dark": "./media/moose-logo.svg" } + }, + { + "id": "ston", + "aliases": [ + "Ston", + "STON" + ], + "extensions": [ + ".ston" + ], + "icon": { + "light": "./media/pharo-bar.svg", + "dark": "./media/pharo-bar.svg" + } } ], "grammars": [ @@ -168,6 +183,11 @@ "language": "pharo", "scopeName": "source.pharo", "path": "./syntaxes/pharo.tmLanguage.json" + }, + { + "language": "ston", + "scopeName": "source.ston", + "path": "./syntaxes/ston.tmLanguage.json" } ], "commands": [ diff --git a/samples/.smalltalk.ston b/samples/.smalltalk.ston new file mode 100644 index 0000000..0bc227d --- /dev/null +++ b/samples/.smalltalk.ston @@ -0,0 +1,17 @@ +SmalltalkCISpec { + #loading : [ + SCIMetacelloLoadSpec { + #baseline : 'PharoLanguageServer', + #directory : 'src', + #ignoreImage : true, + #onConflict : #useIncoming, + #onUpgrade : #useIncoming + } + ], + #testing : { + #coverage : { + #packages : [ 'PharoLanguageServer.*', 'PLS-.*', 'PharoLanguageClient.*', 'PharoLanguageProtocol' ], + #format : #lcov + } + } +} diff --git a/syntaxes/ston.tmLanguage.json b/syntaxes/ston.tmLanguage.json new file mode 100644 index 0000000..a182f2e --- /dev/null +++ b/syntaxes/ston.tmLanguage.json @@ -0,0 +1,102 @@ +{ + "name": "ston", + "foldingStartMarker": "\\[", + "foldingStopMarker": "^\\s*\\]|^\\s\\]", + "fileTypes": [ + "ston" + ], + "patterns": [ + { + "begin": "'", + "beginCaptures": [ + { + "name": "punctuation.definition.string.begin.ston" + } + ], + "end": "'", + "endCaptures": [ + { + "name": "punctuation.definition.string.end.ston" + } + ], + "name": "string.quoted.single.ston" + }, + { + "captures": { + "1": { + "name": "support.class.ston" + } + }, + "comment": "Class Name", + "match": "([a-zA-Z_][a-zA-Z0-9]*) {" + }, + { + "captures": { + "1": { + "name": "support.type.property-name.ston" + } + }, + "comment": "symbols", + "match": "(#[a-zA-Z_][a-zA-Z0-9:]*) :" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.ston" + } + }, + "comment": "symbols", + "match": "(#)[a-zA-Z_][a-zA-Z0-9:]*", + "name": "constant.language.keyword.ston" + }, + { + "match": "\\b(true|false)\\b", + "name": "constant.language.boolean.ston" + }, + { + "begin": "#\\[", + "beginCaptures": [ + { + "name": "punctuation.definition.constant.begin.ston" + } + ], + "end": "\\]", + "endCaptures": [ + { + "name": "punctuation.definition.constant.end.ston" + } + ], + "name": "meta.array.byte.ston", + "patterns": [ + { + "match": "[0-9]+(r[a-zA-Z0-9]+)?", + "name": "constant.numeric.integer.ston" + }, + { + "match": "[^\\s\\]]+", + "name": "invalid.illegal.character-not-allowed-here.ston" + } + ] + }, + { + "begin": "#\\(", + "beginCaptures": [ + { + "name": "punctuation.definition.constant.begin.ston" + } + ], + "comment": "Array Constructor", + "end": "\\)", + "endCaptures": [ + { + "name": "punctuation.definition.constant.end.ston" + } + ], + "name": "constant.other.array.ston" + } + ], + "repository": { + }, + "scopeName": "source.ston" + +} \ No newline at end of file