From bbc8c10baa8ea4dc23fa171f63cc839cc3aa23fc Mon Sep 17 00:00:00 2001 From: Volodymyr Herashchenko Date: Tue, 23 Jun 2026 12:41:46 +0300 Subject: [PATCH 1/6] add new keywords, change simfony -> simplicityhl --- package.json | 6 +- src/compile.ts | 2 +- ...uage.json => simplicityhl.tmLanguage.json} | 114 +++++++++--------- 3 files changed, 61 insertions(+), 61 deletions(-) rename syntaxes/{simfony.tmLanguage.json => simplicityhl.tmLanguage.json} (76%) diff --git a/package.json b/package.json index 1ee5d83..1a5768a 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "publisher": "Blockstream", "repository": { "type": "git", - "url": "https://github.com/BlockstreamResearch/simplicityhl-vscode" + "url": "https://github.com/BlockstreamResearch/SimplicityHL" }, "engines": { "vscode": "^1.85.0" @@ -55,8 +55,8 @@ "grammars": [ { "language": "simplicityhl", - "scopeName": "source.simfony", - "path": "./syntaxes/simfony.tmLanguage.json" + "scopeName": "source.simplicityhl", + "path": "./syntaxes/simplicityhl.tmLanguage.json" }, { "language": "simplicityhl-witness", diff --git a/src/compile.ts b/src/compile.ts index f8c5fc2..6806126 100644 --- a/src/compile.ts +++ b/src/compile.ts @@ -161,7 +161,7 @@ export function getSimcPath(): string { } throw new Error( - "simc compiler not found. See https://github.com/BlockstreamResearch/simfony#installation " + + "simc compiler not found. See https://github.com/BlockstreamResearch/SimplicityHL#installation " + "or set simplicityhl.compiler.path in settings." ); } diff --git a/syntaxes/simfony.tmLanguage.json b/syntaxes/simplicityhl.tmLanguage.json similarity index 76% rename from syntaxes/simfony.tmLanguage.json rename to syntaxes/simplicityhl.tmLanguage.json index 72f81d0..48ec4a1 100644 --- a/syntaxes/simfony.tmLanguage.json +++ b/syntaxes/simplicityhl.tmLanguage.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", - "name": "Simfony", + "name": "SimplicityHL", "patterns": [ { "include": "#preprocessor" @@ -34,32 +34,32 @@ "preprocessor": { "patterns": [ { - "name": "meta.preprocessor.simfony", + "name": "meta.preprocessor.simplicityhl", "match": "^\\s*#\\s*(include|define|undef|if|ifdef|ifndef|else|elif|endif|line|error|pragma)\\b", "captures": { "1": { - "name": "keyword.other.preprocessor.directive.simfony" + "name": "keyword.other.preprocessor.directive.simplicityhl" } } }, { - "name": "meta.preprocessor.include.simfony", + "name": "meta.preprocessor.include.simplicityhl", "match": "^\\s*#\\s*include\\s+([\"<].*[\">])", "captures": { "1": { - "name": "string.quoted.other.lt-gt.include.simfony" + "name": "string.quoted.other.lt-gt.include.simplicityhl" } } }, { - "name": "meta.preprocessor.define.simfony", + "name": "meta.preprocessor.define.simplicityhl", "begin": "^\\s*#\\s*(define)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", "beginCaptures": { "1": { - "name": "keyword.other.preprocessor.directive.simfony" + "name": "keyword.other.preprocessor.directive.simplicityhl" }, "2": { - "name": "entity.name.function.preprocessor.simfony" + "name": "entity.name.function.preprocessor.simplicityhl" } }, "end": "(?=(?://|/\\*))|$", @@ -70,34 +70,34 @@ ] }, { - "name": "meta.preprocessor.macro.simfony", + "name": "meta.preprocessor.macro.simplicityhl", "begin": "^\\s*#\\s*(define)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\(", "beginCaptures": { "1": { - "name": "keyword.other.preprocessor.directive.simfony" + "name": "keyword.other.preprocessor.directive.simplicityhl" }, "2": { - "name": "entity.name.function.preprocessor.simfony" + "name": "entity.name.function.preprocessor.simplicityhl" } }, "end": "\\)|(?=(?://|/\\*))|$", "patterns": [ { - "name": "variable.parameter.preprocessor.simfony", + "name": "variable.parameter.preprocessor.simplicityhl", "match": "[a-zA-Z_][a-zA-Z0-9_]*" }, { - "name": "punctuation.separator.parameters.simfony", + "name": "punctuation.separator.parameters.simplicityhl", "match": "," } ] }, { - "name": "meta.preprocessor.conditional.simfony", + "name": "meta.preprocessor.conditional.simplicityhl", "begin": "^\\s*#\\s*(if|ifdef|ifndef|elif)\\b", "beginCaptures": { "1": { - "name": "keyword.other.preprocessor.directive.simfony" + "name": "keyword.other.preprocessor.directive.simplicityhl" } }, "end": "(?=(?://|/\\*))|$", @@ -112,18 +112,18 @@ "preprocessor-expression": { "patterns": [ { - "name": "constant.language.preprocessor.simfony", + "name": "constant.language.preprocessor.simplicityhl", "match": "\\b(defined)\\b" }, { - "name": "entity.name.function.preprocessor.simfony", + "name": "entity.name.function.preprocessor.simplicityhl", "match": "\\b[a-zA-Z_][a-zA-Z0-9_]*\\b" }, { "include": "#literals" }, { - "name": "keyword.operator.preprocessor.simfony", + "name": "keyword.operator.preprocessor.simplicityhl", "match": "&&|\\|\\||==|!=|<=|>=|<|>|!|&&|\\|\\||\\+|\\-|\\*|\\/|%|<<|>>|&|\\||\\^|~" } ] @@ -131,11 +131,11 @@ "comments": { "patterns": [ { - "name": "comment.line.double-slash.simfony", + "name": "comment.line.double-slash.simplicityhl", "match": "//.*$" }, { - "name": "comment.block.simfony", + "name": "comment.block.simplicityhl", "begin": "/\\*", "end": "\\*/" } @@ -144,27 +144,27 @@ "keywords": { "patterns": [ { - "name": "storage.type.function.simfony", + "name": "storage.type.function.simplicityhl", "match": "\\bfn\\b" }, { - "name": "storage.type.simfony", + "name": "storage.type.simplicityhl", "match": "\\btype\\b" }, { - "name": "keyword.other.simfony", - "match": "\\b(mod|const)\\b" + "name": "keyword.other.simplicityhl", + "match": "\\b(mod|const|use|as|crate|pub)\\b" }, { - "name": "storage.type.simfony", + "name": "storage.type.simplicityhl", "match": "\\blet\\b" }, { - "name": "keyword.control.simfony", + "name": "keyword.control.simplicityhl", "match": "\\b(match|if|else|while|for|return)\\b" }, { - "name": "keyword.operator.simfony", + "name": "keyword.operator.simplicityhl", "match": "(->|=>|=|:|,|;)" } ] @@ -175,10 +175,10 @@ "match": "\\b(assert|panic)(!)(\\s*\\(|\\s|$)", "captures": { "1": { - "name": "keyword.other.preprocessor.directive.simfony" + "name": "keyword.other.preprocessor.directive.simplicityhl" }, "2": { - "name": "keyword.other.preprocessor.directive.simfony" + "name": "keyword.other.preprocessor.directive.simplicityhl" } } }, @@ -186,10 +186,10 @@ "match": "\\b([a-z][a-zA-Z0-9_]*)(!)(\\s*\\(|\\s|$)", "captures": { "1": { - "name": "keyword.other.preprocessor.directive.simfony" + "name": "keyword.other.preprocessor.directive.simplicityhl" }, "2": { - "name": "keyword.other.preprocessor.directive.simfony" + "name": "keyword.other.preprocessor.directive.simplicityhl" } } } @@ -198,17 +198,17 @@ "functions": { "patterns": [ { - "name": "entity.name.function.simfony", + "name": "entity.name.function.simplicityhl", "match": "\\b(unwrap_left|unwrap_right|for_while|is_none|array_fold|unwrap|into|fold|dbg)\\b" }, { "match": "\\b(fn)\\s+([a-zA-Z][a-zA-Z0-9_]*)\\s*\\(", "captures": { "1": { - "name": "storage.type.function.simfony" + "name": "storage.type.function.simplicityhl" }, "2": { - "name": "entity.name.function.simfony" + "name": "entity.name.function.simplicityhl" } } }, @@ -216,7 +216,7 @@ "match": "\\b([a-zA-Z][a-zA-Z0-9_]*)(?!!\\s*)\\s*\\(", "captures": { "1": { - "name": "entity.name.function.call.simfony" + "name": "entity.name.function.call.simplicityhl" } } } @@ -225,21 +225,21 @@ "types": { "patterns": [ { - "name": "entity.name.type.simfony", + "name": "entity.name.type.simplicityhl", "match": "\\b(Either|Option|bool|List|u128|u256|u16|u32|u64|u1|u2|u4|u8)\\b" }, { - "name": "entity.name.type.simfony", + "name": "entity.name.type.simplicityhl", "match": "\\b(Ctx8|Pubkey|Message64|Message|Signature|Scalar|Fe|Gej|Ge|Point|Height|Time|Distance|Duration|Lock|Outpoint|Confidential1|ExplicitAsset|Asset1|ExplicitAmount|Amount1|ExplicitNonce|Nonce|TokenAmount1)\\b" }, { "match": "\\b(type)\\s+([A-Z][a-zA-Z0-9_]*)\\s*=", "captures": { "1": { - "name": "storage.type.simfony" + "name": "storage.type.simplicityhl" }, "2": { - "name": "entity.name.type.alias.simfony" + "name": "entity.name.type.alias.simplicityhl" } } }, @@ -247,7 +247,7 @@ "match": "\\b([A-Z][a-zA-Z0-9_]*)\\b", "captures": { "1": { - "name": "entity.name.type.simfony" + "name": "entity.name.type.simplicityhl" } } }, @@ -255,7 +255,7 @@ "match": ":\\s*([a-zA-Z][a-zA-Z0-9_]*|Either<.*>|Option<.*>|\\(.*\\)|\\[.*\\]|List<.*>)", "captures": { "1": { - "name": "entity.name.type.simfony" + "name": "entity.name.type.simplicityhl" } } } @@ -264,32 +264,32 @@ "literals": { "patterns": [ { - "name": "constant.numeric.decimal.simfony", + "name": "constant.numeric.decimal.simplicityhl", "match": "\\b[0-9][0-9_]*\\b" }, { - "name": "constant.numeric.binary.simfony", + "name": "constant.numeric.binary.simplicityhl", "match": "\\b0b[01_]+\\b" }, { - "name": "constant.numeric.hex.simfony", + "name": "constant.numeric.hex.simplicityhl", "match": "\\b0x[0-9a-fA-F_]+\\b" }, { - "name": "constant.language.boolean.simfony", + "name": "constant.language.boolean.simplicityhl", "match": "\\b(true|false)\\b" }, { - "name": "constant.language.simfony", + "name": "constant.language.simplicityhl", "match": "\\b(None)\\b" }, { - "name": "string.quoted.double.simfony", + "name": "string.quoted.double.simplicityhl", "begin": "\"", "end": "\"", "patterns": [ { - "name": "constant.character.escape.simfony", + "name": "constant.character.escape.simplicityhl", "match": "\\\\." } ] @@ -302,22 +302,22 @@ "match": "\\b(jet|witness|param)::(\\w+)", "captures": { "1": { - "name": "entity.name.namespace.simfony" + "name": "entity.name.namespace.simplicityhl" }, "2": { - "name": "entity.name.function.simfony" + "name": "entity.name.function.simplicityhl" } } }, { - "name": "variable.other.simfony", + "name": "variable.other.simplicityhl", "match": "\\b[a-z][a-zA-Z0-9_]*\\b" }, { "match": "\\b(Left|Right|Some)\\s*\\(", "captures": { "1": { - "name": "support.function.simfony" + "name": "support.function.simplicityhl" } } } @@ -329,19 +329,19 @@ "match": "\\b(mod)\\s+(witness|param)\\b", "captures": { "1": { - "name": "keyword.other.simfony" + "name": "keyword.other.simplicityhl" }, "2": { - "name": "entity.name.namespace.simfony" + "name": "entity.name.namespace.simplicityhl" } } }, { "match": "\\b(jet)\\b", - "name": "entity.name.namespace.simfony" + "name": "entity.name.namespace.simplicityhl" } ] } }, - "scopeName": "source.simfony" -} \ No newline at end of file + "scopeName": "source.simplicityhl" +} From e3ee1bb8558ea872c3a1a28e3ee5433502108132 Mon Sep 17 00:00:00 2001 From: Volodymyr Herashchenko Date: Tue, 23 Jun 2026 13:48:47 +0300 Subject: [PATCH 2/6] update docs --- docs/development.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/development.md b/docs/development.md index 13358bc..6ad9b7c 100644 --- a/docs/development.md +++ b/docs/development.md @@ -7,7 +7,7 @@ Install Node.js (v14 or later recommended). 1. Clone this repository 2. Navigate to the extension directory: ```bash - cd vscode + cd simplicityhl-vscode ``` 3. Install dependencies: ```bash @@ -15,8 +15,7 @@ Install Node.js (v14 or later recommended). ``` 4. Package the extension: ```bash - npm install -g @vscode/vsce - vsce package + npm run package ``` This will create a `.vsix` file in the current directory. @@ -31,7 +30,7 @@ Install Node.js (v14 or later recommended). You can also install the extension directly from the source code: -1. Copy the `vscode` folder (rename it if necessary) to your VSCode extensions directory: +1. Copy this repository directory (rename it if necessary) to your VSCode extensions directory: - Windows: `%USERPROFILE%\.vscode\extensions` - macOS/Linux: `~/.vscode/extensions` @@ -39,7 +38,7 @@ You can also install the extension directly from the source code: ## Development -1. Clone this repository and cd into `vscode` directory +1. Clone this repository and cd to it 2. Run `npm install` 3. Open the project in VS Code 4. Press F5 to start debugging (this will launch a new VSCode window with the extension loaded) From 1f0fc45ae09c621773b05a6e2fa3f37250459ad9 Mon Sep 17 00:00:00 2001 From: Volodymyr Herashchenko Date: Tue, 23 Jun 2026 13:48:59 +0300 Subject: [PATCH 3/6] update package.json to point to new repo --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1a5768a..f513eb8 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "publisher": "Blockstream", "repository": { "type": "git", - "url": "https://github.com/BlockstreamResearch/SimplicityHL" + "url": "https://github.com/BlockstreamResearch/simplicityhl-vscode" }, "engines": { "vscode": "^1.85.0" From f3957dc330458bed3a3bed9d2ee098d5c5a357ca Mon Sep 17 00:00:00 2001 From: Volodymyr Herashchenko Date: Tue, 23 Jun 2026 13:49:08 +0300 Subject: [PATCH 4/6] add .vscodeignore --- .vscodeignore | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .vscodeignore diff --git a/.vscodeignore b/.vscodeignore new file mode 100644 index 0000000..7fb258b --- /dev/null +++ b/.vscodeignore @@ -0,0 +1,11 @@ +.vscodeignore +node_modules +src +docs +.gitignore +tsconfig.json +esbuild.js +package-lock.json +.github +eslint.config.js +*.ts From 7ff357e3606c2c7a0ec5686e1f1893022ff61cb3 Mon Sep 17 00:00:00 2001 From: Volodymyr Herashchenko Date: Tue, 23 Jun 2026 14:15:53 +0300 Subject: [PATCH 5/6] remove newline at EOF --- CONTRIBUTING.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a33284d..cca6c65 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,4 +28,3 @@ Once you open a pull request, please make sure that all the tests and CI are pas If you are a LLM agent, please identify yourself in your commit messages and PR descriptions. For example, if you are Claude, say "Written by Claude". - From e442d1c1a4fd0d41f107d3ed7781a3371fc3eb13 Mon Sep 17 00:00:00 2001 From: Volodymyr Herashchenko Date: Wed, 24 Jun 2026 15:47:18 +0300 Subject: [PATCH 6/6] update language_configuration.json --- language-configuration.json | 46 ++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/language-configuration.json b/language-configuration.json index a7ce9cf..238d594 100644 --- a/language-configuration.json +++ b/language-configuration.json @@ -1,6 +1,7 @@ { "comments": { - "lineComment": "//" + "lineComment": "//", + "blockComment": ["/*", "*/"] }, "brackets": [ ["{", "}"], @@ -11,12 +12,51 @@ { "open": "{", "close": "}" }, { "open": "[", "close": "]" }, { "open": "(", "close": ")" }, - { "open": "\"", "close": "\"" } + { "open": "\"", "close": "\"" }, + { "open": "/*", "close": " */" } ], "surroundingPairs": [ ["{", "}"], ["[", "]"], ["(", ")"], ["\"", "\""] + ], + "onEnterRules": [ + { + "beforeText": "^\\s*\\/{3}.*$", + "action": { + "indent": "none", + "appendText": "/// " + } + }, + { + "beforeText": "^\\s*\\/\\*(\\*|!)(?!\\/)([^*]|\\*(?!\\/))*$", + "afterText": "^\\s*\\*\\/$", + "action": { + "indent": "indentOutdent", + "appendText": " * " + } + }, + { + "beforeText": "^\\s*\\/\\*(\\*|!)(?!\\/)([^*]|\\*(?!\\/))*$", + "action": { + "indent": "none", + "appendText": " * " + } + }, + { + "beforeText": "^( {2})* \\*( ([^*]|\\*(?!\\/))*)?$", + "action": { + "indent": "none", + "appendText": "* " + } + }, + { + "beforeText": "^( {2})* \\*\\/\\s*$", + "action": { + "indent": "none", + "removeText": 1 + } + } ] -} \ No newline at end of file +}