Skip to content

Add AutoHotkey 2.0 extension#6469

Open
BlessEphraem wants to merge 3 commits into
zed-industries:mainfrom
BlessEphraem:add-ahk2-extension
Open

Add AutoHotkey 2.0 extension#6469
BlessEphraem wants to merge 3 commits into
zed-industries:mainfrom
BlessEphraem:add-ahk2-extension

Conversation

@BlessEphraem

Copy link
Copy Markdown

Summary

Adds syntax highlighting support for AutoHotkey v2 (AHK2).

Extension repo: https://github.com/BlessEphraem/zed-ahk2

Why a separate extension from autohotkey?

The existing autohotkey extension targets AHK v1. AHK v2 is a breaking redesign — different syntax, different keywords, different string delimiters (v2 uses " only), different class system, etc. A shared grammar cannot correctly highlight both.

Features

  • Tree-sitter grammar written from scratch for AHK2
  • Hotkeys and hotstrings, including non-ASCII / AZERTY keys (#é::, #²::, !&::, …)
  • Classes, methods, properties, arrow functions
  • Directives (#Requires, #Include, #HotIf, …)
  • Built-in variables (A_ThisHotkey, A_ScriptDir, …)
  • Case-insensitive keyword handling via GLR parsing
  • File extensions: .ah2, .ahk2 (avoids conflict with v1 extension on .ahk)
  • first_line_pattern detects #Requires AutoHotkey 2 for auto-identification

Checklist

  • extension.toml present and valid
  • Grammar compiles (tree-sitter grammar + src/parser.c committed)
  • No .ahk suffix conflict with existing autohotkey extension
  • MIT license

@cla-bot

cla-bot Bot commented Jun 13, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: BlessEphraem.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@cla-bot

cla-bot Bot commented Jun 13, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @BlessEphraem on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@BlessEphraem

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Jun 13, 2026
@cla-bot

cla-bot Bot commented Jun 13, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant