Skip to content

Commit

Permalink
v6.0.0 🥂 (#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-wiemer committed Sep 1, 2024
1 parent b310c29 commit c384830
Show file tree
Hide file tree
Showing 8 changed files with 171 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
140 changes: 136 additions & 4 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -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 + ,`)

<details open><summary>Default AHK++ settings</summary>

```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*(?<tag>.+)",
"completeFunctionCalls": false,
"librarySuggestions": "Disabled",
"symbolFoldingFromOpenBrace": false,
"syntaxes": ""
},
"AHK++.v2.warn": {
"callWithoutParentheses": "Off",
"localSameAsGlobal": false,
"varUnset": true
},
"AHK++.v2.workingDirectories": []
}
```

</details>

### 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!

Expand Down
2 changes: 1 addition & 1 deletion docs/Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
16 changes: 5 additions & 11 deletions docs/FullV2Integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
53 changes: 24 additions & 29 deletions readme.md
Original file line number Diff line number Diff line change
@@ -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!
<div align="center">
<h1>AHK++</h1>
<h2>Full language support for AHK v1 and AHK v2</h2>
<div>IntelliSense</div>
<div>Syntax highlighting</div>
<div>Debug support</div>
<div>Formatting (customizable!)</div>
<div>Quick help</div>
<div>...and more</div>
</div>

## 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

Expand All @@ -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

Expand Down

0 comments on commit c384830

Please sign in to comment.