diff --git a/CHANGELOG.md b/CHANGELOG.md index d44ee1b..1b55c9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to the "vscode-handyllm" extension will be documented in thi Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. +## [0.2.1] - 2024-08-10 + +### Added + +- highlight extra property keywords (`tool` and `array`) for convenience +- add `, * and _ to surrounding pairs + + ## [0.2.0] - 2024-07-05 ### Changed diff --git a/language-configuration.json b/language-configuration.json index a563d9c..80be873 100644 --- a/language-configuration.json +++ b/language-configuration.json @@ -24,6 +24,9 @@ ["[", "]"], ["(", ")"], ["\"", "\""], - ["'", "'"] + ["'", "'"], + ["`", "`"], + ["*", "*"], + ["_", "_"] ] } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index c79ef75..6bbbc25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "handyllm", - "version": "0.2.0", + "version": "0.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "handyllm", - "version": "0.2.0", + "version": "0.2.1", "license": "MIT", "dependencies": { "lodash.debounce": "^4.0.8" diff --git a/package.json b/package.json index 99c906d..88b9c4c 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "url": "https://github.com/atomiechen/vscode-handyllm" }, "private": true, - "version": "0.2.0", + "version": "0.2.1", "engines": { "vscode": "^1.66.0" }, diff --git a/syntaxes/hprompt.tmLanguage.json b/syntaxes/hprompt.tmLanguage.json index 2c25c48..1989aa8 100644 --- a/syntaxes/hprompt.tmLanguage.json +++ b/syntaxes/hprompt.tmLanguage.json @@ -37,7 +37,7 @@ ] }, "block_yaml": { - "begin": "^(\\$\\w+\\$)[^\\S\\r\\n]*({[^{}]*?type\\s*=[^{}]*})[^\\S\\r\\n]*$", + "begin": "^(\\$\\w+\\$)[^\\S\\r\\n]*({[^{}]*?(?:type\\s*=|(?<=\\s|{)(?:tool|array)(?=\\s|}))[^{}]*})[^\\S\\r\\n]*$", "end": "(?=^(\\$\\w+\\$)[^\\S\\r\\n]*({[^{}]*?})?[^\\S\\r\\n]*$)", "beginCaptures": { "0": { @@ -99,25 +99,33 @@ ] }, "extra_properties": { - "match": "(\\w+)\\s*=\\s*(\"[^\"]*\"|\\'[^\\']*\\')", - "captures": { - "1": { - "name": "entity.other.attribute-name" - }, - "2": { - "name": "string.quoted", - "patterns": [ - { - "match": "(?<=\")[^\"]*(?=\")", - "name": "string.quoted.double" + "patterns": [ + { + "match": "(\\w+)\\s*=\\s*(\"[^\"]*\"|\\'[^\\']*\\')", + "captures": { + "1": { + "name": "entity.other.attribute-name" }, - { - "match": "(?<=')[^']*(?=')", - "name": "string.quoted.single" + "2": { + "name": "string.quoted", + "patterns": [ + { + "match": "(?<=\")[^\"]*(?=\")", + "name": "string.quoted.double" + }, + { + "match": "(?<=')[^']*(?=')", + "name": "string.quoted.single" + } + ] } - ] + } + }, + { + "match": "(?<=\\s|{)(tool|array)(?=\\s|})", + "name": "keyword.other" } - } + ] }, "plain_text": { "match": ".",