From 2aa63d78ccd28ad4fd8b9320d270bde8a23abc84 Mon Sep 17 00:00:00 2001 From: sofia-bobbiesi Date: Mon, 9 Jun 2025 15:45:51 -0300 Subject: [PATCH 1/3] add semantic highlighting configuration --- package-lock.json | 4 ++-- package.json | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8d2aceb..83b3179 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "tx3-language-support", - "version": "0.0.5", + "version": "0.0.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "tx3-language-support", - "version": "0.0.5", + "version": "0.0.6", "dependencies": { "html-react-parser": "^5.2.5", "vscode-languageclient": "^8.1.0" diff --git a/package.json b/package.json index 181b27f..aac6deb 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,46 @@ "path": "./syntaxes/tx3.tmLanguage.json" } ], + "configurationDefaults": { + "[tx3]": { + "editor.semanticHighlighting.enabled": true + }, + "editor.semanticTokenColorCustomizations": { + "enabled": true, + "rules": { + "party": { + "foreground": "#4EC9B0", + "fontStyle": "bold" + }, + "policy": { + "foreground": "#9CDCFE", + "fontStyle": "italic" + }, + "transaction": { + "foreground": "#DCDCAA", + "fontStyle": "bold" + }, + "input": { + "foreground": "#569CD6" + }, + "output": { + "foreground": "#CE9178" + }, + "reference": { + "foreground": "#D4D4D4" + }, + "party:declaration": { + "fontStyle": "bold underline" + }, + "policy:declaration": { + "fontStyle": "italic underline" + }, + "transaction:declaration": { + "fontStyle": "bold underline" + } + } + } + }, "commands": [ { "command": "tx3.startServer", @@ -83,6 +123,11 @@ "description": "Path to the Tx3 language server executable", "default": "~/.tx3/default/bin/tx3-lsp" }, + "tx3.semanticHighlighting.enabled": { + "type": "boolean", + "default": true, + "description": "Enable semantic highlighting for Tx3 files" + }, "tx3.trpServers": { "type": "array", "description": "TRP servers list", From 4f6904854d24d64a9d3522605dd6f3826438de1d Mon Sep 17 00:00:00 2001 From: sofia-bobbiesi Date: Thu, 19 Jun 2025 12:55:31 -0300 Subject: [PATCH 2/3] refactor: simplify semantic token color rules in package.json --- package.json | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index aac6deb..6cc8e45 100644 --- a/package.json +++ b/package.json @@ -44,34 +44,23 @@ "enabled": true, "rules": { "party": { - "foreground": "#4EC9B0", - "fontStyle": "bold" + "foreground": "#4EC9B0" }, "policy": { "foreground": "#9CDCFE", "fontStyle": "italic" }, "transaction": { - "foreground": "#DCDCAA", - "fontStyle": "bold" + "foreground": "#DCDCAA" }, "input": { "foreground": "#569CD6" }, "output": { - "foreground": "#CE9178" + "foreground": "#ec4f11" }, "reference": { "foreground": "#D4D4D4" - }, - "party:declaration": { - "fontStyle": "bold underline" - }, - "policy:declaration": { - "fontStyle": "italic underline" - }, - "transaction:declaration": { - "fontStyle": "bold underline" } } } From 8b2db68594bec41aa2806f3efb4ff167a6df4d8a Mon Sep 17 00:00:00 2001 From: sofia-bobbiesi Date: Thu, 26 Jun 2025 16:30:27 -0300 Subject: [PATCH 3/3] fix: update semantic token colors for improved visibility --- package.json | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/package.json b/package.json index 6cc8e45..d82393f 100644 --- a/package.json +++ b/package.json @@ -47,20 +47,8 @@ "foreground": "#4EC9B0" }, "policy": { - "foreground": "#9CDCFE", + "foreground": "#eb66fd", "fontStyle": "italic" - }, - "transaction": { - "foreground": "#DCDCAA" - }, - "input": { - "foreground": "#569CD6" - }, - "output": { - "foreground": "#ec4f11" - }, - "reference": { - "foreground": "#D4D4D4" } } }