From 0f66523694aa85d8f3ccfca837d242d478f552c1 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Date: Sun, 9 Nov 2025 09:49:47 +0100 Subject: [PATCH 1/8] add file icon support and commands to enable/disable icons --- package.json | 28 +++++- resources/icon/dark/systemverilog.svg | 3 + resources/icon/dark/tcl.svg | 4 + resources/icon/dark/ucf.svg | 4 + resources/icon/dark/verilog.svg | 2 +- resources/icon/dark/vhdl.svg | 3 + resources/icon/dark/xdc.svg | 4 + resources/icon/light/systemverilog.svg | 3 + resources/icon/light/tcl.svg | 4 + resources/icon/light/ucf.svg | 4 + resources/icon/light/verilog.svg | 2 +- resources/icon/light/vhdl.svg | 3 + resources/icon/light/xdc.svg | 4 + resources/icon/teroshdl-icon-theme.json | 122 ++++++++++++++++++++++++ src/teroshdl/features/comander/run.ts | 31 ++++++ 15 files changed, 218 insertions(+), 3 deletions(-) create mode 100644 resources/icon/dark/systemverilog.svg create mode 100644 resources/icon/dark/tcl.svg create mode 100644 resources/icon/dark/ucf.svg create mode 100644 resources/icon/dark/vhdl.svg create mode 100644 resources/icon/dark/xdc.svg create mode 100644 resources/icon/light/systemverilog.svg create mode 100644 resources/icon/light/tcl.svg create mode 100644 resources/icon/light/ucf.svg create mode 100644 resources/icon/light/vhdl.svg create mode 100644 resources/icon/light/xdc.svg create mode 100644 resources/icon/teroshdl-icon-theme.json diff --git a/package.json b/package.json index 6e0768e6..539b11cc 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,13 @@ }, "contributes": { + "iconThemes": [ + { + "id": "teroshdl-icons", + "label": "TerosHDL File Icons", + "path": "./resources/icon/teroshdl-icon-theme.json" + } + ], "viewsContainers": { "activitybar": [ { @@ -430,6 +437,14 @@ "command": "teroshdl.open", "title": "Open file with TerosHDL" }, + { + "command": "teroshdl.icons.enable", + "title": "TerosHDL: Enable File Icons" + }, + { + "command": "teroshdl.icons.disable", + "title": "TerosHDL: Disable File Icons" + }, { "command": "teroshdl.configuration.global", "title": "TerosHDL: Open Global Settings Menu" @@ -892,7 +907,18 @@ "mac": "command+delete", "when": "editorTextFocus" } - ] + ], + + "configuration": { + "title": "TerosHDL", + "properties": { + "teroshdl.fileIcons.enabled": { + "type": "boolean", + "default": false, + "markdownDescription": "Enable TerosHDL file icons. To apply changes:\n1. Open Command Palette (Ctrl+Shift+P)\n2. Type 'File Icon Theme'\n3. Select 'TerosHDL File Icons' to enable or 'None' to disable" + } + } + } }, "scripts": { diff --git a/resources/icon/dark/systemverilog.svg b/resources/icon/dark/systemverilog.svg new file mode 100644 index 00000000..ac9cd166 --- /dev/null +++ b/resources/icon/dark/systemverilog.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/icon/dark/tcl.svg b/resources/icon/dark/tcl.svg new file mode 100644 index 00000000..6fbc68e4 --- /dev/null +++ b/resources/icon/dark/tcl.svg @@ -0,0 +1,4 @@ + + +TCL + diff --git a/resources/icon/dark/ucf.svg b/resources/icon/dark/ucf.svg new file mode 100644 index 00000000..1e5950e8 --- /dev/null +++ b/resources/icon/dark/ucf.svg @@ -0,0 +1,4 @@ + + +UCF + diff --git a/resources/icon/dark/verilog.svg b/resources/icon/dark/verilog.svg index 6702f783..ac9cd166 100644 --- a/resources/icon/dark/verilog.svg +++ b/resources/icon/dark/verilog.svg @@ -1,3 +1,3 @@ - + diff --git a/resources/icon/dark/vhdl.svg b/resources/icon/dark/vhdl.svg new file mode 100644 index 00000000..5699362e --- /dev/null +++ b/resources/icon/dark/vhdl.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/icon/dark/xdc.svg b/resources/icon/dark/xdc.svg new file mode 100644 index 00000000..c1563ed7 --- /dev/null +++ b/resources/icon/dark/xdc.svg @@ -0,0 +1,4 @@ + + +XDC + diff --git a/resources/icon/light/systemverilog.svg b/resources/icon/light/systemverilog.svg new file mode 100644 index 00000000..ac9cd166 --- /dev/null +++ b/resources/icon/light/systemverilog.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/icon/light/tcl.svg b/resources/icon/light/tcl.svg new file mode 100644 index 00000000..6fbc68e4 --- /dev/null +++ b/resources/icon/light/tcl.svg @@ -0,0 +1,4 @@ + + +TCL + diff --git a/resources/icon/light/ucf.svg b/resources/icon/light/ucf.svg new file mode 100644 index 00000000..1e5950e8 --- /dev/null +++ b/resources/icon/light/ucf.svg @@ -0,0 +1,4 @@ + + +UCF + diff --git a/resources/icon/light/verilog.svg b/resources/icon/light/verilog.svg index 6702f783..ac9cd166 100644 --- a/resources/icon/light/verilog.svg +++ b/resources/icon/light/verilog.svg @@ -1,3 +1,3 @@ - + diff --git a/resources/icon/light/vhdl.svg b/resources/icon/light/vhdl.svg new file mode 100644 index 00000000..5699362e --- /dev/null +++ b/resources/icon/light/vhdl.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/icon/light/xdc.svg b/resources/icon/light/xdc.svg new file mode 100644 index 00000000..c1563ed7 --- /dev/null +++ b/resources/icon/light/xdc.svg @@ -0,0 +1,4 @@ + + +XDC + diff --git a/resources/icon/teroshdl-icon-theme.json b/resources/icon/teroshdl-icon-theme.json new file mode 100644 index 00000000..da7dd1e4 --- /dev/null +++ b/resources/icon/teroshdl-icon-theme.json @@ -0,0 +1,122 @@ +{ + "iconDefinitions": { + "_vhdl_file": { + "iconPath": "./light/vhdl.svg" + }, + "_vhdl_file_dark": { + "iconPath": "./dark/vhdl.svg" + }, + "_verilog_file": { + "iconPath": "./light/verilog.svg" + }, + "_verilog_file_dark": { + "iconPath": "./dark/verilog.svg" + }, + "_systemverilog_file": { + "iconPath": "./light/systemverilog.svg" + }, + "_systemverilog_file_dark": { + "iconPath": "./dark/systemverilog.svg" + }, + "_tcl_file": { + "iconPath": "./light/tcl.svg" + }, + "_tcl_file_dark": { + "iconPath": "./dark/tcl.svg" + }, + "_xdc_file": { + "iconPath": "./light/xdc.svg" + }, + "_xdc_file_dark": { + "iconPath": "./dark/xdc.svg" + }, + "_ucf_file": { + "iconPath": "./light/ucf.svg" + }, + "_ucf_file_dark": { + "iconPath": "./dark/ucf.svg" + } + }, + "fileExtensions": { + "vhd": "_vhdl_file", + "vhdl": "_vhdl_file", + "vho": "_vhdl_file", + "v": "_verilog_file", + "vh": "_verilog_file", + "vl": "_verilog_file", + "sv": "_systemverilog_file", + "svh": "_systemverilog_file", + "tcl": "_tcl_file", + "pro": "_tcl_file", + "xdc": "_xdc_file", + "sdc": "_xdc_file", + "ldc": "_xdc_file", + "pdc": "_xdc_file", + "ucf": "_ucf_file" + }, + "languageIds": { + "vhdl": "_vhdl_file", + "verilog": "_verilog_file", + "systemverilog": "_systemverilog_file", + "tcl": "_tcl_file", + "xdc": "_xdc_file", + "ldc": "_xdc_file", + "ucf": "_ucf_file" + }, + "light": { + "fileExtensions": { + "vhd": "_vhdl_file", + "vhdl": "_vhdl_file", + "vho": "_vhdl_file", + "v": "_verilog_file", + "vh": "_verilog_file", + "vl": "_verilog_file", + "sv": "_systemverilog_file", + "svh": "_systemverilog_file", + "tcl": "_tcl_file", + "pro": "_tcl_file", + "xdc": "_xdc_file", + "sdc": "_xdc_file", + "ldc": "_xdc_file", + "pdc": "_xdc_file", + "ucf": "_ucf_file" + }, + "languageIds": { + "vhdl": "_vhdl_file", + "verilog": "_verilog_file", + "systemverilog": "_systemverilog_file", + "tcl": "_tcl_file", + "xdc": "_xdc_file", + "ldc": "_xdc_file", + "ucf": "_ucf_file" + } + }, + "highContrast": { + "fileExtensions": { + "vhd": "_vhdl_file_dark", + "vhdl": "_vhdl_file_dark", + "vho": "_vhdl_file_dark", + "v": "_verilog_file_dark", + "vh": "_verilog_file_dark", + "vl": "_verilog_file_dark", + "sv": "_systemverilog_file_dark", + "svh": "_systemverilog_file_dark", + "tcl": "_tcl_file_dark", + "pro": "_tcl_file_dark", + "xdc": "_xdc_file_dark", + "sdc": "_xdc_file_dark", + "ldc": "_xdc_file_dark", + "pdc": "_xdc_file_dark", + "ucf": "_ucf_file_dark" + }, + "languageIds": { + "vhdl": "_vhdl_file_dark", + "verilog": "_verilog_file_dark", + "systemverilog": "_systemverilog_file_dark", + "tcl": "_tcl_file_dark", + "xdc": "_xdc_file_dark", + "ldc": "_xdc_file_dark", + "ucf": "_ucf_file_dark" + } + } +} diff --git a/src/teroshdl/features/comander/run.ts b/src/teroshdl/features/comander/run.ts index 810ba9bd..4979cf26 100644 --- a/src/teroshdl/features/comander/run.ts +++ b/src/teroshdl/features/comander/run.ts @@ -43,6 +43,8 @@ export class Comander { vscode.commands.registerCommand("teroshdl.open", (ags) => this.open_file(ags)); vscode.commands.registerCommand("teroshdl.waveform", (ags) => this.open_waveform(ags)); vscode.commands.registerCommand("teroshdl.openwebview", (ags) => this.open_webview(ags, this.report_webview)); + vscode.commands.registerCommand("teroshdl.icons.enable", () => this.enableFileIcons()); + vscode.commands.registerCommand("teroshdl.icons.disable", () => this.disableFileIcons()); } private open_file(args: vscode.Uri) { @@ -101,4 +103,33 @@ export class Comander { webview.create_webview(args); } + private async enableFileIcons() { + const config = vscode.workspace.getConfiguration(); + await config.update('workbench.iconTheme', 'teroshdl-icons', vscode.ConfigurationTarget.Global); + await config.update('teroshdl.fileIcons.enabled', true, vscode.ConfigurationTarget.Global); + + const action = await vscode.window.showInformationMessage( + 'TerosHDL file icons enabled. Reload window to apply changes?', + 'Reload', + 'Later' + ); + if (action === 'Reload') { + vscode.commands.executeCommand('workbench.action.reloadWindow'); + } + } + + private async disableFileIcons() { + const config = vscode.workspace.getConfiguration(); + await config.update('workbench.iconTheme', null, vscode.ConfigurationTarget.Global); + await config.update('teroshdl.fileIcons.enabled', false, vscode.ConfigurationTarget.Global); + + const action = await vscode.window.showInformationMessage( + 'TerosHDL file icons disabled. Reload window to apply changes?', + 'Reload', + 'Later' + ); + if (action === 'Reload') { + vscode.commands.executeCommand('workbench.action.reloadWindow'); + } + } } \ No newline at end of file From f46728a9214e5bf90f11beaf7b14990d3624dc62 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Date: Sun, 9 Nov 2025 09:54:57 +0100 Subject: [PATCH 2/8] enable TerosHDL file icons by default --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 539b11cc..434eab37 100644 --- a/package.json +++ b/package.json @@ -914,7 +914,7 @@ "properties": { "teroshdl.fileIcons.enabled": { "type": "boolean", - "default": false, + "default": true, "markdownDescription": "Enable TerosHDL file icons. To apply changes:\n1. Open Command Palette (Ctrl+Shift+P)\n2. Type 'File Icon Theme'\n3. Select 'TerosHDL File Icons' to enable or 'None' to disable" } } From f08663910893bf4cbb82dd7964ec214c98749136 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Date: Sun, 9 Nov 2025 09:59:03 +0100 Subject: [PATCH 3/8] remove file icon enable/disable commands from Comander --- package.json | 8 ------- src/teroshdl/features/comander/run.ts | 32 --------------------------- 2 files changed, 40 deletions(-) diff --git a/package.json b/package.json index 434eab37..d63c1c23 100644 --- a/package.json +++ b/package.json @@ -437,14 +437,6 @@ "command": "teroshdl.open", "title": "Open file with TerosHDL" }, - { - "command": "teroshdl.icons.enable", - "title": "TerosHDL: Enable File Icons" - }, - { - "command": "teroshdl.icons.disable", - "title": "TerosHDL: Disable File Icons" - }, { "command": "teroshdl.configuration.global", "title": "TerosHDL: Open Global Settings Menu" diff --git a/src/teroshdl/features/comander/run.ts b/src/teroshdl/features/comander/run.ts index 4979cf26..10c74c1f 100644 --- a/src/teroshdl/features/comander/run.ts +++ b/src/teroshdl/features/comander/run.ts @@ -43,8 +43,6 @@ export class Comander { vscode.commands.registerCommand("teroshdl.open", (ags) => this.open_file(ags)); vscode.commands.registerCommand("teroshdl.waveform", (ags) => this.open_waveform(ags)); vscode.commands.registerCommand("teroshdl.openwebview", (ags) => this.open_webview(ags, this.report_webview)); - vscode.commands.registerCommand("teroshdl.icons.enable", () => this.enableFileIcons()); - vscode.commands.registerCommand("teroshdl.icons.disable", () => this.disableFileIcons()); } private open_file(args: vscode.Uri) { @@ -102,34 +100,4 @@ export class Comander { private open_webview(args: string, webview: Base_webview) { webview.create_webview(args); } - - private async enableFileIcons() { - const config = vscode.workspace.getConfiguration(); - await config.update('workbench.iconTheme', 'teroshdl-icons', vscode.ConfigurationTarget.Global); - await config.update('teroshdl.fileIcons.enabled', true, vscode.ConfigurationTarget.Global); - - const action = await vscode.window.showInformationMessage( - 'TerosHDL file icons enabled. Reload window to apply changes?', - 'Reload', - 'Later' - ); - if (action === 'Reload') { - vscode.commands.executeCommand('workbench.action.reloadWindow'); - } - } - - private async disableFileIcons() { - const config = vscode.workspace.getConfiguration(); - await config.update('workbench.iconTheme', null, vscode.ConfigurationTarget.Global); - await config.update('teroshdl.fileIcons.enabled', false, vscode.ConfigurationTarget.Global); - - const action = await vscode.window.showInformationMessage( - 'TerosHDL file icons disabled. Reload window to apply changes?', - 'Reload', - 'Later' - ); - if (action === 'Reload') { - vscode.commands.executeCommand('workbench.action.reloadWindow'); - } - } } \ No newline at end of file From fe561d26fb6b3ebfed3133ee9afc720df93c67c5 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Date: Sun, 9 Nov 2025 10:00:33 +0100 Subject: [PATCH 4/8] add missing newline at end of file in Comander class --- src/teroshdl/features/comander/run.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/teroshdl/features/comander/run.ts b/src/teroshdl/features/comander/run.ts index 10c74c1f..810ba9bd 100644 --- a/src/teroshdl/features/comander/run.ts +++ b/src/teroshdl/features/comander/run.ts @@ -100,4 +100,5 @@ export class Comander { private open_webview(args: string, webview: Base_webview) { webview.create_webview(args); } + } \ No newline at end of file From 436ade28d2d27b272afff7816db3652a57ed00be Mon Sep 17 00:00:00 2001 From: Gustavo Martin Date: Sat, 13 Dec 2025 07:25:19 +0100 Subject: [PATCH 5/8] remove icon theme. Now icons override default icon theme --- package.json | 180 +++++++++++++----------- resources/icon/teroshdl-icon-theme.json | 122 ---------------- 2 files changed, 96 insertions(+), 206 deletions(-) delete mode 100644 resources/icon/teroshdl-icon-theme.json diff --git a/package.json b/package.json index d63c1c23..82c8f141 100644 --- a/package.json +++ b/package.json @@ -38,13 +38,6 @@ }, "contributes": { - "iconThemes": [ - { - "id": "teroshdl-icons", - "label": "TerosHDL File Icons", - "path": "./resources/icon/teroshdl-icon-theme.json" - } - ], "viewsContainers": { "activitybar": [ { @@ -779,83 +772,102 @@ } ], "languages": [ - - { - "id": "vhdl", - "aliases": ["VHDL", "vhdl"], - "configuration": "./configs/vhdl.configuration.json", - "extensions": [".vhd", ".vho", ".vhdl", ".vhd"] - } - - ,{ - "id": "verilog", - "aliases": ["Verilog", "verilog"], - "configuration": "./configs/verilog.configuration.json", - "extensions": [".v", ".vh", ".vl"] - } - - ,{ - "id": "systemverilog", - "aliases": ["System Verilog", "systemverilog"], - "configuration": "./configs/systemverilog.configuration.json", - "extensions": [".sv", ".svh", ".SV"] - } - - ,{ - "id": "vcd", - "extensions": [".vcd"] - } - - ,{ - "id": "logTerosHDL", - "extensions": [".logTerosHDL"] - } - - ,{ - "id": "gtkw_waveconfig", - "extensions": [".gtkw"] - } - - ,{ - "id": "gtkw_wavebin", - "extensions": [".fst", ".ghw"] - } - - ,{ - "id": "tcl", - "aliases": ["TCL", "tcl"], - "configuration": "./configs/tcl.configuration.json", - "extensions": [".tcl", ".pro"] - } - - ,{ - "id": "ucf", - "aliases": ["vivado ucf", "ucf constraints"], - "configuration": "./configs/ucfconstraints.configuration.json", - "extensions": [".ucf"] - } - - ,{ - "id": "xdc", - "aliases": ["vivado xdc", "xdc constraints"], - "configuration": "./configs/xdcconstraints.configuration.json", - "extensions": [".xdc", ".sdc"] - } - - ,{ - "id": "ldc", - "aliases": ["lattice constraints"], - "configuration": "./configs/xdcconstraints.configuration.json", - "extensions": [".ldc", ".pdc"] - } - - ,{ - "id": "TL-Verilog", - "aliases": ["TL-Verilog", "tlv", "Transactional-Level Verilog"], - "configuration": "./configs/tlverilog.configuration.json", - "extensions": [".tlv"] - } - + { + "id": "vhdl", + "aliases": ["VHDL", "vhdl"], + "configuration": "./configs/vhdl.configuration.json", + "extensions": [".vhd", ".vho", ".vhdl", ".vhd"], + "icon": { + "light": "./resources/icon/light/vhdl.svg", + "dark": "./resources/icon/dark/vhdl.svg" + } + }, + { + "id": "verilog", + "aliases": ["Verilog", "verilog"], + "configuration": "./configs/verilog.configuration.json", + "extensions": [".v", ".vh", ".vl"], + "icon": { + "light": "./resources/icon/light/verilog.svg", + "dark": "./resources/icon/dark/verilog.svg" + } + }, + { + "id": "systemverilog", + "aliases": ["System Verilog", "systemverilog"], + "configuration": "./configs/systemverilog.configuration.json", + "extensions": [".sv", ".svh", ".SV"], + "icon": { + "light": "./resources/icon/light/systemverilog.svg", + "dark": "./resources/icon/dark/systemverilog.svg" + } + }, + { + "id": "vcd", + "extensions": [".vcd"] + }, + { + "id": "logTerosHDL", + "extensions": [".logTerosHDL"] + }, + { + "id": "gtkw_waveconfig", + "extensions": [".gtkw"] + }, + { + "id": "gtkw_wavebin", + "extensions": [".fst", ".ghw"] + }, + { + "id": "tcl", + "aliases": ["TCL", "tcl"], + "configuration": "./configs/tcl.configuration.json", + "extensions": [".tcl", ".pro"], + "icon": { + "light": "./resources/icon/light/tcl.svg", + "dark": "./resources/icon/dark/tcl.svg" + } + }, + { + "id": "ucf", + "aliases": ["vivado ucf", "ucf constraints"], + "configuration": "./configs/ucfconstraints.configuration.json", + "extensions": [".ucf"], + "icon": { + "light": "./resources/icon/light/ucf.svg", + "dark": "./resources/icon/dark/ucf.svg" + } + }, + { + "id": "xdc", + "aliases": ["vivado xdc", "xdc constraints"], + "configuration": "./configs/xdcconstraints.configuration.json", + "extensions": [".xdc", ".sdc"], + "icon": { + "light": "./resources/icon/light/xdc.svg", + "dark": "./resources/icon/dark/xdc.svg" + } + }, + { + "id": "ldc", + "aliases": ["lattice constraints"], + "configuration": "./configs/xdcconstraints.configuration.json", + "extensions": [".ldc", ".pdc"], + "icon": { + "light": "./resources/icon/light/xdc.svg", + "dark": "./resources/icon/dark/xdc.svg" + } + }, + { + "id": "TL-Verilog", + "aliases": ["TL-Verilog", "tlv", "Transactional-Level Verilog"], + "configuration": "./configs/tlverilog.configuration.json", + "extensions": [".tlv"], + "icon": { + "light": "./resources/icon/light/verilog.svg", + "dark": "./resources/icon/dark/verilog.svg" + } + } ], "snippets": [ { diff --git a/resources/icon/teroshdl-icon-theme.json b/resources/icon/teroshdl-icon-theme.json deleted file mode 100644 index da7dd1e4..00000000 --- a/resources/icon/teroshdl-icon-theme.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "iconDefinitions": { - "_vhdl_file": { - "iconPath": "./light/vhdl.svg" - }, - "_vhdl_file_dark": { - "iconPath": "./dark/vhdl.svg" - }, - "_verilog_file": { - "iconPath": "./light/verilog.svg" - }, - "_verilog_file_dark": { - "iconPath": "./dark/verilog.svg" - }, - "_systemverilog_file": { - "iconPath": "./light/systemverilog.svg" - }, - "_systemverilog_file_dark": { - "iconPath": "./dark/systemverilog.svg" - }, - "_tcl_file": { - "iconPath": "./light/tcl.svg" - }, - "_tcl_file_dark": { - "iconPath": "./dark/tcl.svg" - }, - "_xdc_file": { - "iconPath": "./light/xdc.svg" - }, - "_xdc_file_dark": { - "iconPath": "./dark/xdc.svg" - }, - "_ucf_file": { - "iconPath": "./light/ucf.svg" - }, - "_ucf_file_dark": { - "iconPath": "./dark/ucf.svg" - } - }, - "fileExtensions": { - "vhd": "_vhdl_file", - "vhdl": "_vhdl_file", - "vho": "_vhdl_file", - "v": "_verilog_file", - "vh": "_verilog_file", - "vl": "_verilog_file", - "sv": "_systemverilog_file", - "svh": "_systemverilog_file", - "tcl": "_tcl_file", - "pro": "_tcl_file", - "xdc": "_xdc_file", - "sdc": "_xdc_file", - "ldc": "_xdc_file", - "pdc": "_xdc_file", - "ucf": "_ucf_file" - }, - "languageIds": { - "vhdl": "_vhdl_file", - "verilog": "_verilog_file", - "systemverilog": "_systemverilog_file", - "tcl": "_tcl_file", - "xdc": "_xdc_file", - "ldc": "_xdc_file", - "ucf": "_ucf_file" - }, - "light": { - "fileExtensions": { - "vhd": "_vhdl_file", - "vhdl": "_vhdl_file", - "vho": "_vhdl_file", - "v": "_verilog_file", - "vh": "_verilog_file", - "vl": "_verilog_file", - "sv": "_systemverilog_file", - "svh": "_systemverilog_file", - "tcl": "_tcl_file", - "pro": "_tcl_file", - "xdc": "_xdc_file", - "sdc": "_xdc_file", - "ldc": "_xdc_file", - "pdc": "_xdc_file", - "ucf": "_ucf_file" - }, - "languageIds": { - "vhdl": "_vhdl_file", - "verilog": "_verilog_file", - "systemverilog": "_systemverilog_file", - "tcl": "_tcl_file", - "xdc": "_xdc_file", - "ldc": "_xdc_file", - "ucf": "_ucf_file" - } - }, - "highContrast": { - "fileExtensions": { - "vhd": "_vhdl_file_dark", - "vhdl": "_vhdl_file_dark", - "vho": "_vhdl_file_dark", - "v": "_verilog_file_dark", - "vh": "_verilog_file_dark", - "vl": "_verilog_file_dark", - "sv": "_systemverilog_file_dark", - "svh": "_systemverilog_file_dark", - "tcl": "_tcl_file_dark", - "pro": "_tcl_file_dark", - "xdc": "_xdc_file_dark", - "sdc": "_xdc_file_dark", - "ldc": "_xdc_file_dark", - "pdc": "_xdc_file_dark", - "ucf": "_ucf_file_dark" - }, - "languageIds": { - "vhdl": "_vhdl_file_dark", - "verilog": "_verilog_file_dark", - "systemverilog": "_systemverilog_file_dark", - "tcl": "_tcl_file_dark", - "xdc": "_xdc_file_dark", - "ldc": "_xdc_file_dark", - "ucf": "_ucf_file_dark" - } - } -} From 82558b3e8b87c92f4220b33b6da56f8a7fd9ba04 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Date: Sat, 13 Dec 2025 07:31:29 +0100 Subject: [PATCH 6/8] fix after dev pull --- package.json | 7 -- resources/icon/teroshdl-icon-theme.json | 122 ------------------------ 2 files changed, 129 deletions(-) delete mode 100644 resources/icon/teroshdl-icon-theme.json diff --git a/package.json b/package.json index 5a4c5f86..b4f6e05e 100644 --- a/package.json +++ b/package.json @@ -38,13 +38,6 @@ }, "contributes": { - "iconThemes": [ - { - "id": "teroshdl-icons", - "label": "TerosHDL File Icons", - "path": "./resources/icon/teroshdl-icon-theme.json" - } - ], "viewsContainers": { "activitybar": [ { diff --git a/resources/icon/teroshdl-icon-theme.json b/resources/icon/teroshdl-icon-theme.json deleted file mode 100644 index da7dd1e4..00000000 --- a/resources/icon/teroshdl-icon-theme.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "iconDefinitions": { - "_vhdl_file": { - "iconPath": "./light/vhdl.svg" - }, - "_vhdl_file_dark": { - "iconPath": "./dark/vhdl.svg" - }, - "_verilog_file": { - "iconPath": "./light/verilog.svg" - }, - "_verilog_file_dark": { - "iconPath": "./dark/verilog.svg" - }, - "_systemverilog_file": { - "iconPath": "./light/systemverilog.svg" - }, - "_systemverilog_file_dark": { - "iconPath": "./dark/systemverilog.svg" - }, - "_tcl_file": { - "iconPath": "./light/tcl.svg" - }, - "_tcl_file_dark": { - "iconPath": "./dark/tcl.svg" - }, - "_xdc_file": { - "iconPath": "./light/xdc.svg" - }, - "_xdc_file_dark": { - "iconPath": "./dark/xdc.svg" - }, - "_ucf_file": { - "iconPath": "./light/ucf.svg" - }, - "_ucf_file_dark": { - "iconPath": "./dark/ucf.svg" - } - }, - "fileExtensions": { - "vhd": "_vhdl_file", - "vhdl": "_vhdl_file", - "vho": "_vhdl_file", - "v": "_verilog_file", - "vh": "_verilog_file", - "vl": "_verilog_file", - "sv": "_systemverilog_file", - "svh": "_systemverilog_file", - "tcl": "_tcl_file", - "pro": "_tcl_file", - "xdc": "_xdc_file", - "sdc": "_xdc_file", - "ldc": "_xdc_file", - "pdc": "_xdc_file", - "ucf": "_ucf_file" - }, - "languageIds": { - "vhdl": "_vhdl_file", - "verilog": "_verilog_file", - "systemverilog": "_systemverilog_file", - "tcl": "_tcl_file", - "xdc": "_xdc_file", - "ldc": "_xdc_file", - "ucf": "_ucf_file" - }, - "light": { - "fileExtensions": { - "vhd": "_vhdl_file", - "vhdl": "_vhdl_file", - "vho": "_vhdl_file", - "v": "_verilog_file", - "vh": "_verilog_file", - "vl": "_verilog_file", - "sv": "_systemverilog_file", - "svh": "_systemverilog_file", - "tcl": "_tcl_file", - "pro": "_tcl_file", - "xdc": "_xdc_file", - "sdc": "_xdc_file", - "ldc": "_xdc_file", - "pdc": "_xdc_file", - "ucf": "_ucf_file" - }, - "languageIds": { - "vhdl": "_vhdl_file", - "verilog": "_verilog_file", - "systemverilog": "_systemverilog_file", - "tcl": "_tcl_file", - "xdc": "_xdc_file", - "ldc": "_xdc_file", - "ucf": "_ucf_file" - } - }, - "highContrast": { - "fileExtensions": { - "vhd": "_vhdl_file_dark", - "vhdl": "_vhdl_file_dark", - "vho": "_vhdl_file_dark", - "v": "_verilog_file_dark", - "vh": "_verilog_file_dark", - "vl": "_verilog_file_dark", - "sv": "_systemverilog_file_dark", - "svh": "_systemverilog_file_dark", - "tcl": "_tcl_file_dark", - "pro": "_tcl_file_dark", - "xdc": "_xdc_file_dark", - "sdc": "_xdc_file_dark", - "ldc": "_xdc_file_dark", - "pdc": "_xdc_file_dark", - "ucf": "_ucf_file_dark" - }, - "languageIds": { - "vhdl": "_vhdl_file_dark", - "verilog": "_verilog_file_dark", - "systemverilog": "_systemverilog_file_dark", - "tcl": "_tcl_file_dark", - "xdc": "_xdc_file_dark", - "ldc": "_xdc_file_dark", - "ucf": "_ucf_file_dark" - } - } -} From 23338e2bba7ef77d76d789c6192927144fc5785f Mon Sep 17 00:00:00 2001 From: Gustavo Martin Date: Sat, 13 Dec 2025 08:44:02 +0100 Subject: [PATCH 7/8] moved icons to auto_package --- auto_package/language.yml | 26 +- .../templates/language_and_snippet.nj | 7 +- package.json | 222 +++++++++--------- 3 files changed, 143 insertions(+), 112 deletions(-) diff --git a/auto_package/language.yml b/auto_package/language.yml index 2488a99a..3ff1d683 100644 --- a/auto_package/language.yml +++ b/auto_package/language.yml @@ -3,18 +3,27 @@ configuration: "./configs/vhdl.configuration.json" snippets: "./snippets/vhdl/vhdl.json" aliases: ["VHDL", "vhdl"] + icon: + light: "./resources/icon/light/vhdl.svg" + dark: "./resources/icon/dark/vhdl.svg" - id: "verilog" extensions: [".v", ".vh", ".vl"] configuration: "./configs/verilog.configuration.json" snippets: "./snippets/verilog/verilog.json" aliases: ["Verilog", "verilog"] + icon: + light: "./resources/icon/light/verilog.svg" + dark: "./resources/icon/dark/verilog.svg" - id: "systemverilog" extensions: [".sv", ".svh", ".SV"] configuration: "./configs/systemverilog.configuration.json" snippets: "./snippets/systemverilog/systemverilog.json" aliases: ["System Verilog", "systemverilog"] + icon: + light: "./resources/icon/light/systemverilog.svg" + dark: "./resources/icon/dark/systemverilog.svg" - id: "vcd" extensions: [".vcd"] @@ -33,26 +42,41 @@ configuration: "./configs/tcl.configuration.json" snippets: "./snippets/tcl/tcl.json" aliases: ["TCL", "tcl"] + icon: + light: "./resources/icon/light/tcl.svg" + dark: "./resources/icon/dark/tcl.svg" - id: "ucf" extensions: [".ucf"] configuration: "./configs/ucfconstraints.configuration.json" aliases: ["vivado ucf", "ucf constraints"] + icon: + light: "./resources/icon/light/ucf.svg" + dark: "./resources/icon/dark/ucf.svg" - id: "xdc" extensions: [".xdc", ".sdc"] configuration: "./configs/xdcconstraints.configuration.json" snippets: "./snippets/xdc/xdc.json" aliases: ["vivado xdc", "xdc constraints"] + icon: + light: "./resources/icon/light/xdc.svg" + dark: "./resources/icon/dark/xdc.svg" - id: "ldc" extensions: [".ldc", ".pdc"] configuration: "./configs/xdcconstraints.configuration.json" snippets: "./snippets/xdc/xdc.json" aliases: ["lattice constraints"] + icon: + light: "./resources/icon/light/xdc.svg" + dark: "./resources/icon/dark/xdc.svg" - id: "TL-Verilog" extensions: [".tlv"] configuration: "./configs/tlverilog.configuration.json" snippets: "./snippets/tlverilog/tlverilog.json" - aliases: ["TL-Verilog", "tlv", "Transactional-Level Verilog"] \ No newline at end of file + aliases: ["TL-Verilog", "tlv", "Transactional-Level Verilog"] + icon: + light: "./resources/icon/light/verilog.svg" + dark: "./resources/icon/dark/verilog.svg" \ No newline at end of file diff --git a/auto_package/templates/language_and_snippet.nj b/auto_package/templates/language_and_snippet.nj index d3d34232..aa8873c1 100644 --- a/auto_package/templates/language_and_snippet.nj +++ b/auto_package/templates/language_and_snippet.nj @@ -13,7 +13,12 @@ {%- if "configuration" in language %} "configuration": "{{language["configuration"]}}", {%- endif %} - "extensions": {{language["extensions"] | replace("'", '"')}} + "extensions": {{language["extensions"] | replace("'", '"')}}{%- if "icon" in language %}, + "icon": { + "light": "{{language["icon"]["light"]}}", + "dark": "{{language["icon"]["dark"]}}" + } + {%- endif %} } {% set ns.counter = ns.counter + 1 %} {%- endfor %} diff --git a/package.json b/package.json index b4f6e05e..40529467 100644 --- a/package.json +++ b/package.json @@ -772,102 +772,115 @@ } ], "languages": [ - { - "id": "vhdl", - "aliases": ["VHDL", "vhdl"], - "configuration": "./configs/vhdl.configuration.json", - "extensions": [".vhd", ".vho", ".vhdl", ".vhd"], - "icon": { - "light": "./resources/icon/light/vhdl.svg", - "dark": "./resources/icon/dark/vhdl.svg" - } - }, - { - "id": "verilog", - "aliases": ["Verilog", "verilog"], - "configuration": "./configs/verilog.configuration.json", - "extensions": [".v", ".vh", ".vl"], - "icon": { - "light": "./resources/icon/light/verilog.svg", - "dark": "./resources/icon/dark/verilog.svg" - } - }, - { - "id": "systemverilog", - "aliases": ["System Verilog", "systemverilog"], - "configuration": "./configs/systemverilog.configuration.json", - "extensions": [".sv", ".svh", ".SV"], - "icon": { - "light": "./resources/icon/light/systemverilog.svg", - "dark": "./resources/icon/dark/systemverilog.svg" - } - }, - { - "id": "vcd", - "extensions": [".vcd"] - }, - { - "id": "logTerosHDL", - "extensions": [".logTerosHDL"] - }, - { - "id": "gtkw_waveconfig", - "extensions": [".gtkw"] - }, - { - "id": "gtkw_wavebin", - "extensions": [".fst", ".ghw"] - }, - { - "id": "tcl", - "aliases": ["TCL", "tcl"], - "configuration": "./configs/tcl.configuration.json", - "extensions": [".tcl", ".pro"], - "icon": { - "light": "./resources/icon/light/tcl.svg", - "dark": "./resources/icon/dark/tcl.svg" - } - }, - { - "id": "ucf", - "aliases": ["vivado ucf", "ucf constraints"], - "configuration": "./configs/ucfconstraints.configuration.json", - "extensions": [".ucf"], - "icon": { - "light": "./resources/icon/light/ucf.svg", - "dark": "./resources/icon/dark/ucf.svg" - } - }, - { - "id": "xdc", - "aliases": ["vivado xdc", "xdc constraints"], - "configuration": "./configs/xdcconstraints.configuration.json", - "extensions": [".xdc", ".sdc"], - "icon": { - "light": "./resources/icon/light/xdc.svg", - "dark": "./resources/icon/dark/xdc.svg" - } - }, - { - "id": "ldc", - "aliases": ["lattice constraints"], - "configuration": "./configs/xdcconstraints.configuration.json", - "extensions": [".ldc", ".pdc"], - "icon": { - "light": "./resources/icon/light/xdc.svg", - "dark": "./resources/icon/dark/xdc.svg" - } - }, - { - "id": "TL-Verilog", - "aliases": ["TL-Verilog", "tlv", "Transactional-Level Verilog"], - "configuration": "./configs/tlverilog.configuration.json", - "extensions": [".tlv"], - "icon": { - "light": "./resources/icon/light/verilog.svg", - "dark": "./resources/icon/dark/verilog.svg" - } + + { + "id": "vhdl", + "aliases": ["VHDL", "vhdl"], + "configuration": "./configs/vhdl.configuration.json", + "extensions": [".vhd", ".vho", ".vhdl", ".vhd"], + "icon": { + "light": "./resources/icon/light/vhdl.svg", + "dark": "./resources/icon/dark/vhdl.svg" + } + } + + ,{ + "id": "verilog", + "aliases": ["Verilog", "verilog"], + "configuration": "./configs/verilog.configuration.json", + "extensions": [".v", ".vh", ".vl"], + "icon": { + "light": "./resources/icon/light/verilog.svg", + "dark": "./resources/icon/dark/verilog.svg" + } + } + + ,{ + "id": "systemverilog", + "aliases": ["System Verilog", "systemverilog"], + "configuration": "./configs/systemverilog.configuration.json", + "extensions": [".sv", ".svh", ".SV"], + "icon": { + "light": "./resources/icon/light/systemverilog.svg", + "dark": "./resources/icon/dark/systemverilog.svg" + } + } + + ,{ + "id": "vcd", + "extensions": [".vcd"] + } + + ,{ + "id": "logTerosHDL", + "extensions": [".logTerosHDL"] + } + + ,{ + "id": "gtkw_waveconfig", + "extensions": [".gtkw"] + } + + ,{ + "id": "gtkw_wavebin", + "extensions": [".fst", ".ghw"] + } + + ,{ + "id": "tcl", + "aliases": ["TCL", "tcl"], + "configuration": "./configs/tcl.configuration.json", + "extensions": [".tcl", ".pro"], + "icon": { + "light": "./resources/icon/light/tcl.svg", + "dark": "./resources/icon/dark/tcl.svg" } + } + + ,{ + "id": "ucf", + "aliases": ["vivado ucf", "ucf constraints"], + "configuration": "./configs/ucfconstraints.configuration.json", + "extensions": [".ucf"], + "icon": { + "light": "./resources/icon/light/ucf.svg", + "dark": "./resources/icon/dark/ucf.svg" + } + } + + ,{ + "id": "xdc", + "aliases": ["vivado xdc", "xdc constraints"], + "configuration": "./configs/xdcconstraints.configuration.json", + "extensions": [".xdc", ".sdc"], + "icon": { + "light": "./resources/icon/light/xdc.svg", + "dark": "./resources/icon/dark/xdc.svg" + } + } + + ,{ + "id": "ldc", + "aliases": ["lattice constraints"], + "configuration": "./configs/xdcconstraints.configuration.json", + "extensions": [".ldc", ".pdc"], + "icon": { + "light": "./resources/icon/light/xdc.svg", + "dark": "./resources/icon/dark/xdc.svg" + } + } + + ,{ + "id": "TL-Verilog", + "aliases": ["TL-Verilog", "tlv", "Transactional-Level Verilog"], + "configuration": "./configs/tlverilog.configuration.json", + "extensions": [".tlv"], + "icon": { + "light": "./resources/icon/light/verilog.svg", + "dark": "./resources/icon/dark/verilog.svg" + } + } + ], "snippets": [ { @@ -911,18 +924,7 @@ "mac": "command+delete", "when": "editorTextFocus" } - ], - - "configuration": { - "title": "TerosHDL", - "properties": { - "teroshdl.fileIcons.enabled": { - "type": "boolean", - "default": true, - "markdownDescription": "Enable TerosHDL file icons. To apply changes:\n1. Open Command Palette (Ctrl+Shift+P)\n2. Type 'File Icon Theme'\n3. Select 'TerosHDL File Icons' to enable or 'None' to disable" - } - } - } + ] }, "scripts": { @@ -952,11 +954,11 @@ "netlistsvg": "https://github.com/TerosTechnology/netlistsvg.git#hierarchy", "open": "8.3.0", "proper-lockfile": "4.1.1", - "semver": "^7.6.3", + "semver": "7.3.5", "shelljs": "^0.8.3", "tmp": "0.2.1", "vscode-languageclient": "^9.0.1", - "xml2js": "^0.6.2", + "xml2js": "0.4.23", "nunjucks": "^3.2.0", "@types/nunjucks": "^3.1.4", "tree-kill": "1.2.2", @@ -974,7 +976,7 @@ "fast-xml-parser": "4.3.2", "jest-html-reporter": "^3.7.0", "js-yaml": "^4.1.0", - "json5": "^2.2.3", + "json5": "2.1.3", "lodash": "^4.17.21", "onml": "2.1.0", "pyodide": "0.24.1", From 9f0c21c32377c3dd1c351111f5f5cb5f44670346 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Date: Sat, 13 Dec 2025 08:48:39 +0100 Subject: [PATCH 8/8] update dependencies: align semver, xml2js, and json5 versions --- auto_package/templates/dependencie.nj | 6 +++--- package.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/auto_package/templates/dependencie.nj b/auto_package/templates/dependencie.nj index fb1fd1dc..2336c4f4 100644 --- a/auto_package/templates/dependencie.nj +++ b/auto_package/templates/dependencie.nj @@ -7,11 +7,11 @@ "netlistsvg": "https://github.com/TerosTechnology/netlistsvg.git#hierarchy", "open": "8.3.0", "proper-lockfile": "4.1.1", - "semver": "7.3.5", + "semver": "^7.6.3", "shelljs": "^0.8.3", "tmp": "0.2.1", "vscode-languageclient": "^9.0.1", - "xml2js": "0.4.23", + "xml2js": "^0.6.2", "nunjucks": "^3.2.0", "@types/nunjucks": "^3.1.4", "tree-kill": "1.2.2", @@ -29,7 +29,7 @@ "fast-xml-parser": "4.3.2", "jest-html-reporter": "^3.7.0", "js-yaml": "^4.1.0", - "json5": "2.1.3", + "json5": "^2.2.3", "lodash": "^4.17.21", "onml": "2.1.0", "pyodide": "0.24.1", diff --git a/package.json b/package.json index 40529467..1bc3c141 100644 --- a/package.json +++ b/package.json @@ -954,11 +954,11 @@ "netlistsvg": "https://github.com/TerosTechnology/netlistsvg.git#hierarchy", "open": "8.3.0", "proper-lockfile": "4.1.1", - "semver": "7.3.5", + "semver": "^7.6.3", "shelljs": "^0.8.3", "tmp": "0.2.1", "vscode-languageclient": "^9.0.1", - "xml2js": "0.4.23", + "xml2js": "^0.6.2", "nunjucks": "^3.2.0", "@types/nunjucks": "^3.1.4", "tree-kill": "1.2.2", @@ -976,7 +976,7 @@ "fast-xml-parser": "4.3.2", "jest-html-reporter": "^3.7.0", "js-yaml": "^4.1.0", - "json5": "2.1.3", + "json5": "^2.2.3", "lodash": "^4.17.21", "onml": "2.1.0", "pyodide": "0.24.1",