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/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. 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": [