Skip to content

Commit

Permalink
Update contributions, fixup commands (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-wiemer authored Sep 1, 2024
1 parent 4636f69 commit b310c29
Show file tree
Hide file tree
Showing 33 changed files with 431 additions and 240 deletions.
2 changes: 1 addition & 1 deletion ahk2
Submodule ahk2 updated from e737e7 to a19404
File renamed without changes.
2 changes: 1 addition & 1 deletion demos/manualTests/_readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## AHK++ manual tests

As a final sanity check, here are some manual tests to run. Be sure to packag the extension and install from VSIX before executing them. Each file describes itself. Feel free to open a discussion if you have any questions :)
As a final sanity check, here are some manual tests to run. Be sure to package the extension and install from VSIX before executing them. Each file describes itself. Feel free to open a discussion if you have any questions :)
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@ ExitApp
; Settings: No compile base file v1
; Open Ahk2Exe.exe and set base file to a v1 interpreter. Save as default.
; Ctrl+Shift+F9 to compile this script
; Should succeed

; Settings: No compile base file v1
; Open Ahk2Exe.exe and set base file to a v2 interpreter. Save as default.
; Ctrl+Shift+F9 to compile this script
; Should fail

; Settings: Compile base file v1 set to v1 interpreter.
; C:/Program Files/AutoHotkey/v1.1.37.02/AutoHotkeyU64.exe
; Open Ahk2Exe.exe and set base file to a v2 interpreter. Save as default.
; Ctrl+Shift+F9 to compile this script
; Should succeed
11 changes: 9 additions & 2 deletions demos/manualTests/compile.ahk2
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@
MsgBox("Hello world v2!")
ExitApp()

; Settings: No base file v2.
; Settings: No compile base file v2.
; Open Ahk2Exe.exe and set base file to a v2 interpreter. Save as default.
; Ctrl+Shift+F9 to compile this script
; Should succeed

; Settings: Base file v2 set to v2 interpreter:
; Settings: No compile base file v2
; Open Ahk2Exe.exe and set base file to a v1 interpreter. Save as default.
; Ctrl+Shift+F9 to compile this script
; Should fail

; Settings: Compile base file v2 set to v2 interpreter.
; C:/Program Files/AutoHotkey/v2/AutoHotkey64.exe
; Open Ahk2Exe.exe and set base file to a v1 interpreter. Save as default.
; Ctrl+Shift+F9 to compile this script
; Should succeed
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,8 @@ compTest(p1, p2) {
; Suggestions outside of method exclude locals
p

; Default settings (enabled IntelliSense, enabled parsing) shows suggestions
c

; Disabled IntelliSense with enabled parsing shows no suggestions
; Default settings (enabled parsing) shows suggestions
c

; Enabled IntelliSense with disabled parsing shows no suggestions
c

; Disabled IntelliSense with disabled parsing shows no suggestions
c
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
; x := 2
; }
global x
if true { x := 1 } else { x := 2 }
if true
{
x := 1
} else {
x := 2
}

;; wrapLineLength 120
MyFunc(argument1, argument2, argument3, argument4, argument5, argument6, argument7, argument8, argument9, argument10, arg11) {
Expand Down
4 changes: 0 additions & 4 deletions demos/manualTests/formatting.ahk2

This file was deleted.

1 change: 1 addition & 0 deletions demos/manualTests/help.ahk → demos/manualTests/help.ahk1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#SingleInstance force

; Select a word and use Ctrl+F1 to open help
; C:\Program Files\AutoHotkey\v1.1.37.02\AutoHotkey.chm
; Click on a word (but don't select it), open help should still search that word
; Use open help when your cursor is on a blank line--no errors should occur

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Requires AutoHotkey v2.0

; F2 renames variables
b := 1
b := 2
c := 1
c := 2
2 changes: 2 additions & 0 deletions demos/manualTests/run.ahk → demos/manualTests/run.ahk1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#SingleInstance force

; Ctrl+F9 to run
; return focus to VS Code
; Ctrl+F6 to stop

MsgBox % "You did it!"

Expand Down
2 changes: 2 additions & 0 deletions demos/manualTests/run.ahk2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#SingleInstance

; Ctrl+F9 to run
; return focus to VS Code
; Ctrl+F6 to stop

MsgBox("You did it!")

Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion demos/manualTests/v2/settings.ahk2
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@

; Comment Tag Regex
; comments matching the regex show up in the command palette and breadcrumb
; Ctrl+Shift+O or F1 > "Go to Symbol in Editor
; Ctrl+Shift+O or F1 > "Go to Symbol in Editor"
;; hello world

; Complete Function Calls
; when typing a function name, the parens are automatically added
; cursor moved to the middle of the parens


; todo Completion Commit Characters is untested for now

;; Diagnostics
Expand Down
19 changes: 10 additions & 9 deletions docs/FullV2Integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ 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.
- 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.
- 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.
- 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.
- 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.
- 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
Expand Down Expand Up @@ -116,17 +116,18 @@ New, added:

These issues will be resolved before a full release

- [#486](https://github.com/mark-wiemer-org/ahkpp/issues/486)
- Ensure commands work with both v1 and v2 as intended
- Cleanup and organize settings names and IDs
- [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

- Exclude setting doesn't work, ref [issue #488](https://github.com/mark-wiemer-org/ahkpp/issues/488)
- No newline at end of file when formatting (inconsistent with v1 and industry standards)
- No browser support (AHK++ did not have this before, we can add it later if users want it)
- Hardlink config files shared between ahk2 submodule and global package (e.g. `*.nls*.json`)
- Explain formatter options
- Issue with custom folding and comment blocks (see v2/settings.ahk2)
- Cleanup `indentString` to be "spaces" vs "tabs" with a `tabSize` option as well
- Error message: `Request textDocument/foldingRange failed.` on files that switch from AHK v2 to v1, see manualTests/languageVersion

### Cut

- No browser support. AHK++ did not have this before, we can add it later if users want it
Loading

0 comments on commit b310c29

Please sign in to comment.