The "Set AHK v2 Interpreter" command does not work
Description
When running "Set AHK v2 Interpreter" from either the status bar or the command palette, the quick pick appears and the confirmed choice is reflected in the status bar. However, my settings are not saved to settings.json and trying to run an AHK v2 script with a bad path still fails with the "... does not exist" error message.
Additional context
I'm not sure if this ever worked, but I'm a bit sick right now so I can't debug before today's release. Just noting it for reference, should be fixed by end of year.
Don't want to create duplicate issues, but with respect to the Interpreter:
I have both v1 and v2 interpreters' paths set correctly, and the extension correctly parses scripts identifying the version for any given active script; however, with version 1 scripts, the interpreter does not appear to change to version 2, see below:
Similarly, while intellisense and script errors are identified for version 2 scripts, it does not appear to work at all for version 1. For context:
This same version 1 script was the active file in the editor when both the above screenshots were taken.
with version 1 scripts, the interpreter does not appear to change to version 2
The file association does not automatically change in VS Code, unfortunately, you need to manually set it by clicking "AutoHotkey v1" in the status bar on the right. Alternatively, using #Requires directives will help.
See more details at https://github.com/mark-wiemer-org/ahkpp/discussions/445 :)
script errors are identified for version 2 scripts, it does not appear to work at all for version 1
Yes, this is a missing feature in v1 support. You're welcome to open a feature request, but I'm focusing on bugfixes for now, so don't expect any new features soon. If you do want errors identified, please specify which errors are most important to you, and I'll add those one at a time.
If I'm wrong, and errors were found earlier but aren't found any more, you're welcome to rollback to a specific version of AHK++ where things work, see https://github.com/mark-wiemer-org/ahkpp/blob/main/docs/Troubleshooting.md for details :)
It actually is recognizing v1 scripts automaticallly.. See the status bar on the right in first image - it correctly switches to v1 after parsing the script. it's just the interpreter that doesn't change.
Thanks, I'll play around with previous versions and see what happens!
The interpreter status bar item at the bottom left is unique to v2, it has no effect when a v1 script is open. I'll see about showing it only when a v2 script is open.
In short, I think the extension is working for you :)
Fixed in 6.5.0 :)
Unable to repro with version 6.4.3 and 6.4.1, leaving this as "completed" but this may have been a false positive in the first place. Regardless, it's working on workspaces with and without workspace settings in all scenarios I've tried :)
This error is still happening over here. Using 6.5.0. Just fixed by manually entering the path into the settings.json