From c384830bc327a2f6f3005b457f81a7eab4ed83d5 Mon Sep 17 00:00:00 2001 From: Mark Wiemer <7833360+mark-wiemer@users.noreply.github.com> Date: Sun, 1 Sep 2024 15:03:57 -0700 Subject: [PATCH] =?UTF-8?q?v6.0.0=20=F0=9F=A5=82=20(#490)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 2 +- Changelog.md | 140 ++++++++++++++++++++++++++++++++++- ahk2 | 2 +- docs/Development.md | 2 +- docs/FullV2Integration.md | 16 ++-- package-lock.json | 4 +- package.json | 2 +- readme.md | 53 ++++++------- 8 files changed, 171 insertions(+), 50 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 42d01f53..776da86b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,4 +26,4 @@ jobs: # Saved locally as "CI VS Code Marketplace Publish Token", expires 2024-06-22 pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} registryUrl: https://marketplace.visualstudio.com - preRelease: true + # preRelease: true diff --git a/Changelog.md b/Changelog.md index e87f5985..8e9f6c03 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,14 +1,146 @@ # Changelog -## 6.0.0 - unreleased +## 6.0.0 - 2024-09-01 ๐Ÿฅ‚ -AHK++ 6 introduces full v2 support, including formatting, enhanced IntelliSense and debug support, and more! +### Full AHK v2 support is here! -Changes listed here are compared to AHK++ 5.0.7. +AHK++ 6 incorporates [AutoHotkey v2 Language Support 2.4.9 by thqby](https://marketplace.visualstudio.com/items?itemName=thqby.vscode-autohotkey2-lsp) to deliver full v2 support, including formatting, enhanced IntelliSense and debug support, and more! + +All changes are compared to AHK++ 5.0.7. + +- v2 formatting support +- v2 IntelliSense support +- Start and stop scripts via VS Code keybindings + +More changes are listed below the breaking changes... ### โ›“๏ธโ€๐Ÿ’ฅ Breaking changes -- Remove `intellisense.enableIntellisense` setting: IntelliSense is now always on +Settings are now organized into flat objects for a better user experience. Unfortunately, this means settings will have to be replaced when upgrading to AHK++ 6. This is a one-time fixup. Below are sample settings matching the new schema and default values of AHK++. You can learn more about the settings via VS Code's settings UI (`Ctrl + ,`) + +
Default AHK++ settings + +```json +// settings.json +{ + // ...other settings... + "AHK++.compiler": { + "compileIcon": "", + "compilerPath": "C:/Program Files/AutoHotkey/Compiler/Ahk2Exe.exe", + "useMpress": false + }, + "AHK++.menu": { + "showDebugButton": true + }, + "AHK++.v1.file": { + "compileBaseFile": "", + "helpPath": "C:/Program Files/AutoHotkey/AutoHotkey.chm", + "interpreterPath": "C:/Program Files/AutoHotkey/AutoHotkeyU64.exe", + "templateSnippetName": "AhkTemplateV1" + }, + "AHK++.v1.formatter": { + "allowedNumberOfEmptyLines": 1, + "indentCodeAfterIfDirective": true, + "indentCodeAfterLabel": true, + "preserveIndent": false, + "trimExtraSpaces": true + }, + "AHK++.v1.intellisense": { + "maximumParseLength": 10000 + }, + "AHK++.v2.completionCommitCharacters": { + "Class": ".(", + "Function": "(" + }, + "AHK++.v2.debugConfiguration": { + "port": "9002-9100", + "useAnnounce": "detail", + "useAutoJumpToError": true, + "useDebugDirective": true, + "usePerfTips": true + }, + "AHK++.v2.diagnostics": { + "classNonDynamicMemberCheck": true, + "paramsCheck": true + }, + // โš ๏ธ Not yet supported, ref [issue #488](https://github.com/mark-wiemer-org/ahkpp/issues/488) + "AHK++.v2.exclude": [], + "AHK++.v2.file": { + "compileBaseFile": "", + "helpPath": "C:/Program Files/AutoHotkey/v2/AutoHotkey.chm", + "interpreterPath": "C:\\Program Files\\AutoHotkey\\v2\\AutoHotkey64.exe", + "maxScanDepth": 2, + "templateSnippetName": "AhkTemplateV2" + }, + "AHK++.v2.formatter": { + "arrayStyle": "none", + "braceStyle": "One True Brace", + "breakChainedMethods": false, + "ignoreComment": false, + "indentString": " ", + "indentBetweenHotIfDirectives": false, + "keywordStartWithUppercase": false, + "maxPreserveNewlines": 2, + "objectStyle": "none", + "preserveNewlines": true, + "spaceBeforeConditional": true, + "spaceAfterDoubleColon": true, + "spaceInEmptyParen": false, + "spaceInOther": true, + "spaceInParen": false, + "switchCaseAlignment": false, + "symbolWithSameCase": false, + "whitespaceBeforeInlineComment": "", + "wrapLineLength": 120 + }, + "AHK++.v2.general": { + "actionWhenV1Detected": "SwitchToV1", + "commentTagRegex": "^;;\\s*(?.+)", + "completeFunctionCalls": false, + "librarySuggestions": "Disabled", + "symbolFoldingFromOpenBrace": false, + "syntaxes": "" + }, + "AHK++.v2.warn": { + "callWithoutParentheses": "Off", + "localSameAsGlobal": false, + "varUnset": true + }, + "AHK++.v2.workingDirectories": [] +} +``` + +
+ +### New commands + +- Debug AHK and Attach: Debug and attach to the debug session for advanced use-cases. Requires zero-plusplus.vscode-autohotkey-debug. +- Debug AHK with Params (`Ctrl + F5`): Debug and add user-provided command-line arguments to the debugger for advanced use-cases. Requires zero-plusplus.vscode-autohotkey-debug. +- Run AHK++ Diagnostic: Effectively restart the AHK v2 features of the app. +- Export AHK Symbols: Export application functions and classes to a new file. Only for AHK v2. +- Stop AHK Script (`Ctrl + F6`): Stop an AHK script of user choice ran via `Run AHK Script` or any of the `Debug AHK ...` commands. If only one script is running, stop that without asking for confirmation. +- Add Doc Comment: Add a function header comment for the current function +- Update File Version Info: Add or update a file header comment +- Switch AHK Version: Change between AHK v1 and v2 for the current file +- Select AHK Syntaxes: Select custom AHK v2 syntax files for advanced use-cases. PRs are welcomed if the default syntaxes aren't sufficient! +- Set A_ScriptDir Here: Set [`A_ScriptDir`](https://www.autohotkey.com/docs/v2/Variables.htm#ScriptDir) to the path of the current file. Only for AHK v2. +- Set AHK v2 Interpreter: Open a quick pick to change the AHK v2 intepreter for all scripts. + +### Other changes + +- Context menu commands are now organized near the top of the menu + +### Developer changes + +- Use ESLint 9 and typescript-eslint 8 for better code hygiene checks +- Upgrade from Node 16 to Node 20 +- Remove husky and lint-staged for simplicity +- Modernize unit tests with @vscode/test-cli +- Add recommended VS Code extensions for working in this codebase +- Simplify launch configurations +- Improve manual tests and add manual tests for new AHK v2 capabilities +- Add [full v2 integration docs](docs/FullV2Integration.md) +- Clarify [license](license.txt): even more open-source than before! ### ๐Ÿ’š Thank you! diff --git a/ahk2 b/ahk2 index a19404fb..a99fd09e 160000 --- a/ahk2 +++ b/ahk2 @@ -1 +1 @@ -Subproject commit a19404fb14dcf5290032307643c8c9e5b59473b0 +Subproject commit a99fd09eb55b6516bc3f334f5bea41ed9dec62c2 diff --git a/docs/Development.md b/docs/Development.md index abfd1d4f..b058a352 100644 --- a/docs/Development.md +++ b/docs/Development.md @@ -55,4 +55,4 @@ When the tag is pushed, changes will automatically be published. 1. [Deploy workflow](https://github.com/mark-wiemer-org/ahkpp/actions/workflows/deploy.yml) 1. [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=mark-wiemer.vscode-autohotkey-plus-plus) 1. [Publisher view](https://marketplace.visualstudio.com/manage/publishers/mark-wiemer): validation takes about 5 minutes -1. [Open VSX Marketplace](https://open-vsx.org/extension/mark-wiemer-org/ahkpp) +1. [Open VSX Marketplace](https://open-vsx.org/extension/mark-wiemer/vscode-autohotkey-plus-plus) diff --git a/docs/FullV2Integration.md b/docs/FullV2Integration.md index 3d5469a2..a67bf397 100644 --- a/docs/FullV2Integration.md +++ b/docs/FullV2Integration.md @@ -12,15 +12,15 @@ This doc covers all the new features as a result of integrating with thqby's AHK ### New commands -- Debug AHK and Attach (`ahk++.debugAttach`): Debug and attach to the debug session for advanced use-cases. Requires zero-plusplus.vscode-autohotkey-debug. Only for AHK v2. -- Debug AHK with Params (`ahk++.debugParams`): Debug and add user-provided command-line arguments to the debugger for advanced use-cases. Requires zero-plusplus.vscode-autohotkey-debug. Only for AHK v2. +- Debug AHK and Attach (`ahk++.debugAttach`): Debug and attach to the debug session for advanced use-cases. Requires zero-plusplus.vscode-autohotkey-debug. +- Debug AHK with Params (`ahk++.debugParams`): Debug and add user-provided command-line arguments to the debugger for advanced use-cases. Requires zero-plusplus.vscode-autohotkey-debug. - Run AHK++ Diagnostic (`ahk++.diagnostic.full`): Effectively restart the AHK v2 features of the app. - Export AHK Symbols (`ahk++.exportSymbols`): Export application functions and classes to a new file. Only for AHK v2. -- Stop AHK Script (`ahk++.stop`): Stop an AHK script of user choice ran via `Run AHK Script` or any of the `Debug AHK ...` commands. If only one script is running, stop that without asking for confirmation. Only for AHK v2. +- Stop AHK Script (`ahk++.stop`): Stop an AHK script of user choice ran via `Run AHK Script` or any of the `Debug AHK ...` commands. If only one script is running, stop that without asking for confirmation. - Add Doc Comment (`ahk++.addDocComment`): Add a function header comment for the current function - Update File Version Info (`ahk++.updateVersionInfo`): Add or update a file header comment -- Switch AHK Version (`ahk++.switchAhkVersion`): Change between v1 and v2 for the current file -- Select AHK Syntaxes (`ahk++.selectSyntaxes`): Select custom syntax files for advanced use-cases. Only for AHK v2. PRs are welcomed if the default syntaxes aren't sufficient! +- Switch AHK Version (`ahk++.switchAhkVersion`): Change between AHK v1 and v2 for the current file +- Select AHK Syntaxes (`ahk++.selectSyntaxes`): Select custom AHK v2 syntax files for advanced use-cases. PRs are welcomed if the default syntaxes aren't sufficient! - Set A_ScriptDir Here (`ahk++.setAScriptDir`): Set [`A_ScriptDir`](https://www.autohotkey.com/docs/v2/Variables.htm#ScriptDir) to the path of the current file. Only for AHK v2. - Set AHK v2 Interpreter (`ahk++.setV2Interpreter`): Open a quick pick to change the AHK v2 intepreter for all scripts. @@ -112,12 +112,6 @@ New, added: ## Known issues -### Blocking - -These issues will be resolved before a full release - -- [Release pipeline](../.github/workflows/deploy.yml) has been changed to push pre-releases. Definitely fix this for the final release ๐Ÿ˜‰ - ### Low priority These issues will be backlogged and resolved after a full release diff --git a/package-lock.json b/package-lock.json index 40341022..09b78d7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vscode-autohotkey-plus-plus", - "version": "5.1.4", + "version": "6.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "vscode-autohotkey-plus-plus", - "version": "5.1.4", + "version": "6.0.0", "license": "See license.txt", "dependencies": { "@vscode/debugadapter": "^1.57.0", diff --git a/package.json b/package.json index b6a38b98..4e73888f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vscode-autohotkey-plus-plus", "displayName": "AutoHotkey Plus Plus", - "version": "5.1.4", + "version": "6.0.0", "description": "AutoHotkey v1 and v2 language support for Visual Studio Code: IntelliSense, debugging, formatting, and more!", "categories": [ "Debuggers", diff --git a/readme.md b/readme.md index 6cd80e4b..26bc783b 100644 --- a/readme.md +++ b/readme.md @@ -1,46 +1,40 @@ -# AutoHotkey Plus Plus (AHK++) - -AutoHotkey Plus Plus (AHK++) provides AutoHotkey language support for VS Code. For AHK v1, this includes: - -- IntelliSense -- syntax highlighting -- debug support -- formatting -- quick help -- ...and more! +
+

AHK++

+

Full language support for AHK v1 and AHK v2

+
IntelliSense
+
Syntax highlighting
+
Debug support
+
Formatting (customizable!)
+
Quick help
+
...and more
+
## Install Install from VS Code or install from [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=mark-wiemer.vscode-autohotkey-plus-plus). -## AHK v2 full support in pre-release! - -AutoHotkey v2 support has been a [long-requested feature](https://github.com/mark-wiemer-org/ahkpp/issues/96), and v5.0.0 supports many key features. The latest [๐Ÿงช pre-release version](https://code.visualstudio.com/updates/v1_63#_pre-release-extensions), v5.1.0, adds full v2 support! +## AHK v2 full support is here! ๐Ÿฅ‚ -Supported features include: +AHK++ 6 now incorporates [AutoHotkey v2 Language Support by thqby](https://marketplace.visualstudio.com/items?itemName=thqby.vscode-autohotkey2-lsp), meaning full AHK v2 support: -- Running and debugging v1 and v2 scripts without changing settings +- Running, debugging, and stopping v1 and v2 scripts without changing settings - Full syntax highlighting for v2 scripts -- "Open help" (Ctrl + F1) opens language-specific help (and includes your text selection!) -- Unique icons for v1 (blue) and v2 (green) -- Rich IntelliSense support with snippets and hover text (๐Ÿงช pre-release only) -- Formatting files (๐Ÿงช pre-release only) +- "Open help" (`Ctrl + F1`) opens language-specific help (and includes your text selection) +- Unique icons for AHK v1 (blue) and v2 (green) +- Rich IntelliSense support with snippets, hover text, and suggestions +- Formatting files with many customized options -For known issues, see [the changelog](./Changelog.md) +For all changes, including breaking changes, see [the changelog](./Changelog.md) -Please [๐Ÿ› report any issues](https://github.com/mark-wiemer-org/ahkpp/issues/new/choose), it helps bring full v2 support to the release version faster ๐Ÿง‘โ€๐Ÿ’ป +As always, please [๐Ÿ› report any issues](https://github.com/mark-wiemer-org/ahkpp/issues/new/choose) -๐Ÿ’š Special thanks to [thqby](https://github.com/thqby), as this would not have been possible without thqby's open-source [AutoHotkey v2 Language Support](https://marketplace.visualstudio.com/items?itemName=thqby.vscode-autohotkey2-lsp)! +๐Ÿ’š Special thanks again to [thqby](https://github.com/thqby), as this would not have been possible without thqby's open-source [AutoHotkey v2 Language Support](https://marketplace.visualstudio.com/items?itemName=thqby.vscode-autohotkey2-lsp)! -## Why AutoHotkey Plus Plus? +### โ›“๏ธโ€๐Ÿ’ฅ Breaking changes -AutoHotkey Plus Plus is one of many extensions that offer VS Code language support. So why should you use this one? +When adding all the new settings, VS Code's setting UX became overwhelming. Settings are now organized into flat objects, which should improve UX and reduce the need for breaking changes in the future! See [the changelog](./Changelog.md) for details. -- **Supports both v1 and v2**: AHK++ supports both AHK v1 and v2, making it the only extension to support both major versions of AutoHotkey! -- **Actively maintained**: Any issues encountered while using this extension can be reported and fixed. With other extensions, anything that's broken will stay broken forever. You can report any issues with AHK++ (and view all issues) through the [issue tracker](https://github.com/mark-wiemer-org/ahkpp/issues). -- **IntelliSense**: Smart code completion, syntax highlighting, code navigation, and more. -- **Debug support**: Run and debug AHK scripts from VS Code. -- **New features**: Another benefit to active maintenance is that AHK++ can add new features as users request them. For example, quick help, formatter directives, and custom new file templates were all added based on user feedback! +--- ## Commands @@ -51,6 +45,7 @@ With AHK++, you can compile, debug, and run your scripts with keyboard shortcuts - Open help: `Ctrl + F1` - Run: `Ctrl + F9` - Run selection: `Ctrl + F8` +- Stop: `Ctrl + F6` ## Debug