From d274087ab4580ec30cf4ef7a3c7031185367c6d2 Mon Sep 17 00:00:00 2001 From: Lukas Neubert <40118727+serkonda7@users.noreply.github.com> Date: Wed, 9 Apr 2025 19:46:13 +0200 Subject: [PATCH 1/2] enable web extension launch --- .vscode/launch.json | 13 +++++++++++++ dist/web/webextension.js | 8 ++++++++ package.json | 1 + 3 files changed, 22 insertions(+) create mode 100644 dist/web/webextension.js diff --git a/.vscode/launch.json b/.vscode/launch.json index 46d6033..fbc474b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -35,6 +35,19 @@ ], "outFiles": ["${workspaceRoot}/dist/client/out/test/**/*.js"] }, + { + "name": "Run Web Extension in VS Code", + "type": "pwa-extensionHost", + "debugWebWorkerHost": true, + "request": "launch", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}", + "--extensionDevelopmentKind=web" + ], + "outFiles": [ + "${workspaceFolder}/dist/web/*.js" + ] + }, { "name": "Debug ANTLR4 grammar", "type": "antlr-debug", diff --git a/dist/web/webextension.js b/dist/web/webextension.js new file mode 100644 index 0000000..3ea3e22 --- /dev/null +++ b/dist/web/webextension.js @@ -0,0 +1,8 @@ +const vscode = require('vscode') + +function activate(context) { + // Dummy function for activation in web environment + console.log('VBA extension activated') +} + +module.exports = { activate } diff --git a/package.json b/package.json index 9a12247..b156d14 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "vscode": "^1.63.0" }, "main": "dist/client/out/extension", + "browser": "dist/web/webextension.js", "activationEvents": [], "contributes": { "languages": [ From a7a41d5b86828febf94fdcb3018a13fdb067efc5 Mon Sep 17 00:00:00 2001 From: Lukas Neubert <40118727+serkonda7@users.noreply.github.com> Date: Wed, 9 Apr 2025 19:49:07 +0200 Subject: [PATCH 2/2] mention in readme --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 4d13f35..9ee9ddc 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,11 @@ Provides Visual Basic for Applications (VBA) language support in Visual Studio C 1Currently full document `Shift+Alt+F` formatting only. +### Web Support + +The VBA Pro Extension offers limited support for web environments (e.g. vscode-dev). +This includes syntax highlighting and snippets. + ### Syntax Highlighting The most complete and bug-free TextMate grammar for VBA out there.