Skip to content

Commit

Permalink
Merge pull request #3 from mark-wiemer/v-2.5.12
Browse files Browse the repository at this point in the history
v2.5.12
  • Loading branch information
mark-wiemer authored Nov 8, 2020
2 parents 00d79c5 + efebbcf commit 9af7baf
Show file tree
Hide file tree
Showing 12 changed files with 84 additions and 70 deletions.
7 changes: 3 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.1.0",
"configurations": [
Expand All @@ -16,7 +15,7 @@
{
"type": "ahk",
"request": "launch",
"name": "Autohotkey v1 Debugger",
"name": "AutoHotkey v1 Debugger",
"program": "${workspaceFolder}/demos/demo_for_ahk_v1.ahk",
"runtime": "C:\\Program Files\\Autohotkey\\AutoHotkeyU64.exe",
"stopOnEntry": false,
Expand All @@ -27,9 +26,9 @@
{
"type": "ahk",
"request": "launch",
"name": "Autohotkey v2 Debugger",
"name": "AutoHotkey v2 Debugger",
"program": "${workspaceFolder}/demos/demo_for_ahk_v2.ahk",
"runtime": "C:\\Program Files\\AutoHotkey\\v2-alpha\\x64\\AutoHotkey.exe", // Default value of Scite for ahk v2
"runtime": "C:\\Program Files\\AutoHotkey\\v2-alpha\\x64\\AutoHotkey.exe",
"stopOnEntry": false,
"dbgpSettings": {
"max_children": 149
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## 2.5.12 - 2020-11-08

- Improve settings readability
- Fix bogus snippets
- Improve Marketplace presence

## 2.5.11 - 2020-11-07

- Update icon
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2020 weijan (https://github.com/cweijan), mark-wiemer (https://github.com/mark-wiemer)
Copyright 2020 weijan (https://github.com/cweijan), Mark Wiemer (https://github.com/mark-wiemer)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# AutoHotkey Plus Plus
# AutoHotkey Plus Plus (AHK++)

AutoHotkey language and debug support for VS Code. This extension is a fork of the deprecated [AutoHotkey Plus by cweijan](https://github.com/cweijan/vscode-autohotkey).
AutoHotkey Plus Plus (AHK++) provides actively maintained, comprehensive AutoHotkey language support for VS Code. This includes IntelliSense and debug support, along with the standard code highlighting. AHK++ is a fork of the deprecated [AutoHotkey Plus by cweijan](https://github.com/cweijan/vscode-autohotkey#readme).

> Visit the [project site](https://github.com/mark-wiemer/vscode-autohotkey)
> View this README on the [project site](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus#readme)
## Contents

- [Why AutoHotkey Plus Plus?](#why-autohotkey-plus-plus)
- [Coffee](#coffee)
- [Install](#install)
- [Debug](#debug)
Expand All @@ -18,12 +19,20 @@ AutoHotkey language and debug support for VS Code. This extension is a fork of t
- [Hover Tip](#hover-tip)
- [Code Format](#code-format)
- [Context Menu](#context-menu)
- [Setting](#setting)
- [Credits](#credits)

## Why AutoHotkey Plus Plus?

AutoHotkey Plus Plus is one of many extensions that offer VS Code language support. So why should you use this one?

- **IntelliSense**: Smart code completion, syntax highlighting, code navigation, and more.
**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 (and view all issues) at [the issue tracker](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues)
- **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.

## Coffee

If you like this this extension, consider [buying the orignal author a coffee](https://www.buymeacoffee.com/cweijan). Thank you!
If you like this extension, consider [buying the orignal author a coffee](https://www.buymeacoffee.com/cweijan). Thank you!

## Install

Expand Down Expand Up @@ -85,7 +94,7 @@ Usage: Move mouse to function call or command.

Supports standard VS Code formatting.

> Formatter is not currently customizable.
> The formatter is not currently customizable.
![Code Format](image/codeFormat.jpg)

Expand All @@ -99,10 +108,6 @@ Right-click to open the context menu, then:
- **Compile**: Compile script in same directory (`Ctrl + Shift + F9`).
![compile](image/compile.jpg)

## Setting

Find more info in VS Code settings for `AutoHotkey Plus Plus`.

## Credits

Previous extensions:
Expand Down
2 changes: 2 additions & 0 deletions docs/Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This document covers the development process, from writing code to publishing a
1. Write the code on the `dev` branch, or offshoots of that branch. Merge the changes to the `dev` branch as they become stable.
1. Once the `dev` branch has all the features for a new release, create a new release branch named `v-<major>.<minor>.<patch>` (e.g. `v-2.5.10`).
1. Push the changes, open a PR, review the changes, and merge to `master`.
1. Confirm the package version has been updated
1. Confirm the changelog has been updated
1. Pull the new master branch
1. Package the new release using `vsce package`.
1. Publish the release through [Visual Studio Marketplace](https://marketplace.visualstudio.com/manage/publishers/mark-wiemer)
Expand Down
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "vscode-autohotkey-plus-plus",
"displayName": "AutoHotkey Plus Plus",
"description": "AutoHotkey language and debug support for VS Code, forked from AutoHotkey Plus by cweijan",
"version": "2.5.10",
"description": "AutoHotkey IntelliSense, debug, and language support for VS Code, forked from AutoHotkey Plus by cweijan",
"version": "2.5.12",
"publisher": "mark-wiemer",
"engines": {
"vscode": "^1.30.0"
Expand All @@ -20,12 +20,12 @@
"license": "See LICENSE file",
"icon": "icon.png",
"bugs": {
"url": "https://github.com/mark-wiemer/vscode-autohotkey/issues"
"url": "https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues"
},
"homepage": "https://github.com/mark-wiemer/vscode-autohotkey/blob/master/README.md",
"homepage": "https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/blob/master/README.md",
"repository": {
"type": "git",
"url": "https://github.com/mark-wiemer/vscode-autohotkey.git"
"url": "https://github.com/mark-wiemer/vscode-autohotkey-plus-plus.git"
},
"galleryBanner": {
"color": "#00769D",
Expand All @@ -45,7 +45,7 @@
"debuggers": [
{
"type": "ahk",
"label": "Autohotkey",
"label": "AutoHotkey",
"program": "./out/debugger/DebugAdapter.js",
"runtime": "\"C:\\Program Files\\Autohotkey\\AutoHotkeyU64.exe\"",
"configurationAttributes": {
Expand Down Expand Up @@ -98,18 +98,18 @@
{
"type": "ahk",
"request": "launch",
"name": "Autohotkey Debugger",
"name": "AutoHotkey Debugger",
"program": "${file}",
"stopOnEntry": true
}
],
"configurationSnippets": [
{
"label": "Autohotkey Debug: Launch",
"label": "AutoHotkey Debug: Launch",
"body": {
"type": "ahk",
"request": "launch",
"name": "Autohotkey Debugger",
"name": "AutoHotkey Debugger",
"program": "${file}",
"stopOnEntry": true
}
Expand Down Expand Up @@ -148,12 +148,12 @@
},
{
"command": "run.ahk",
"title": "Run Ahk Script",
"title": "Run AHK Script",
"category": "AHK"
},
{
"command": "debug.ahk",
"title": "Debug Ahk Script",
"title": "Debug AHK Script",
"category": "AHK",
"icon": {
"light": "./image/run.png",
Expand Down Expand Up @@ -209,20 +209,20 @@
"type": "object",
"title": "AutoHotkey Plus Plus",
"properties": {
"vscode-ahk-plus.executePath": {
"ahk++.executePath": {
"type": "string",
"default": "C:/Program Files/Autohotkey/AutoHotkeyU64.exe",
"description": "The execute path of ahk."
"default": "C:/Program Files/AutoHotkey/AutoHotkeyU64.exe",
"description": "The execute path of AHK."
},
"vscode-ahk-plus.compilePath": {
"ahk++.compilePath": {
"type": "string",
"default": "C:/Program Files/autoHotkey/Compiler/Ahk2Exe.exe",
"description": "The compiler path of ahk."
"default": "C:/Program Files/AutoHotkey/Compiler/Ahk2Exe.exe",
"description": "The compiler path of AHK."
},
"vscode-ahk-plus.enableIntelliSense": {
"ahk++.intellisense": {
"type": "boolean",
"default": true,
"description": "EnableIntelliSense(Preview)."
"description": "Enable IntelliSense (Preview). Changes take effect after reload."
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions snippets/ahk.json
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@
},
"Exception()": {
"prefix": "Exception",
"body": "Exception(${Message})",
"body": "Exception(${1:Message})",
"description": "Creates an object with properties, also common to exceptions created by runtime errors."
},
"Throw": {
Expand Down Expand Up @@ -1335,17 +1335,17 @@
},
"ObjRelease()": {
"prefix": "ObjRelease()",
"body": "ObjRelease($Ptr)",
"body": "ObjRelease(${1:Ptr})",
"description": "Decrements an object's reference count."
},
"ObjAddRef()": {
"prefix": "ObjAddRef()",
"body": "ObjAddRef($Ptr)",
"body": "ObjAddRef(${1:Ptr})",
"description": "Increments an object's reference count."
},
"ComObject()": {
"prefix": "ComObject()",
"body": "ComObject(${VarType}, ${Value} [, ${Flags}])",
"body": "ComObject(${1:VarType}, ${2:Value} [, ${3:Flags}])",
"description": "Creates an object representing a typed value to be passed as a parameter or return value.."
},
"ComObjCreate()": {
Expand Down
4 changes: 2 additions & 2 deletions src/common/global.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as vscode from 'vscode';

export class Global {
public static CONFIG_PREFIX = 'vscode-ahk-plus';
public static CONFIG_PREFIX = 'ahk++';
private static statusBarItem: vscode.StatusBarItem;
/**
* get configuration from vscode setting.
Expand Down Expand Up @@ -31,5 +31,5 @@ export class Global {
export enum ConfigKey {
compilePath = 'compilePath',
executePath = 'executePath',
enableIntelliSense = 'enableIntelliSense',
intellisense = 'intellisense',
}
8 changes: 4 additions & 4 deletions src/core/ScriptRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export class ScriptRunner {
vscode.debug.startDebugging(vscode.workspace.getWorkspaceFolder(cwd), {
type: debugPlusExists ? 'autohotkey' : 'ahk',
request: 'launch',
name: 'Autohotkey Debugger',
runtime: Global.getConfig(ConfigKey.executePath),
name: 'AutoHotkey Debugger',
runtime: Global.getConfig<string>(ConfigKey.executePath),
program: script,
});
}
Expand All @@ -39,7 +39,7 @@ export class ScriptRunner {
debug: boolean = false,
debugPort = 9000,
): Promise<boolean> {
executePath = Global.getConfig(ConfigKey.executePath);
executePath = Global.getConfig<string>(ConfigKey.executePath);
if (!vscode.window.activeTextEditor.document.isUntitled) {
vscode.commands.executeCommand('workbench.action.files.save');
}
Expand Down Expand Up @@ -81,7 +81,7 @@ export class ScriptRunner {
currentPath.substr(0, pos < 0 ? currentPath.length : pos) + '.exe';
if (
await Process.exec(
`"${Global.getConfig(
`"${Global.getConfig<string>(
ConfigKey.compilePath,
)}" /in "${currentPath}" /out "${compilePath}"`,
{ cwd: `${res(currentPath, '..')}` },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import { Out } from '../common/out';
import { Global, ConfigKey } from '../common/global';

/**
* A Ahk runtime debugger.
* An AHK runtime debugger.
* refrence: https://xdebug.org/docs/dbgp
*/
export class DebugDispather extends EventEmitter {
export class DebugDispatcher extends EventEmitter {
private debugServer: DebugServer;
private breakPointHandler: BreakPointHandler;
private commandHandler: CommandHandler;
Expand Down Expand Up @@ -100,7 +100,7 @@ export class DebugDispather extends EventEmitter {
}

if (!existsSync(runtime)) {
Out.log(`Autohotkey Execute Bin Not Found : ${runtime}`);
Out.log(`AutoHotkey Execute Bin Not Found: ${runtime}`);
this.end();
return;
}
Expand Down
Loading

0 comments on commit 9af7baf

Please sign in to comment.