First-class editing support for AutoIt v3 (.au3, .a3x) in the Zed editor — syntax highlighting, live diagnostics, hover docs for ~3,500 built-in and library functions, outline, go-to-definition, find-references, completion, signature help, inlay hints, code actions, code formatting, semantic highlighting, document highlight, folding, call hierarchy, color swatches, cross-file #include resolution, snippets, and one-keystroke task runners for the AutoIt toolchain.
- Syntax highlighting via a from-scratch tree-sitter grammar — 182 corpus tests, 99.96% pass rate against AutoIt's bundled Examples directory (2,662 files).
- Live diagnostics via the autoit-lsp language server, which wraps AutoIt's official
Au3Check.exe. Edits surface red squiggles ~400ms after you stop typing (configurable) without needing to save. - Hover docs for 3,542 functions (core builtins + UDF library) from the official AutoIt help — signature, summary, parameter list, return value, and a footer link to the canonical docs page.
- Go-to-definition — jump to where any function, variable, or constant is declared. Works within the current file and across
#included files. - Find-references — locate all usages of the symbol under the cursor, scope-aware (local variables only match within their function). Project-wide: when a folder is open, references in files that
#includethe current one are found too. - Document highlight — place the cursor on a variable or function and every other occurrence in the file is passively highlighted, distinguishing reads from writes (the left-hand side of an assignment renders as a write).
- Call hierarchy — incoming ("who calls this?") and outgoing ("what does this call?") trees for any function, spanning the
#includegraph and the whole project. Computed by the language server today, but Zed has no call-hierarchy UI yet (zed-industries/zed#14203) — it lights up automatically once Zed ships one. - Completion — context-aware popup for variables (
$), macros (@), functions (built-in and user-defined), and symbols from included files. Also completes file paths inside#includedirectives. - Signature help — parameter popup as you type inside a function call, with the active parameter highlighted. Covers all ~3,542 built-in and UDF library functions plus user-defined functions with their doc-comments. Requires two Zed settings to enable — see Signature help and inlay hints below.
- Inlay hints — always-visible parameter name labels on existing call sites (e.g.
flag: 0 title: "Hi" text: "Hello"). Works out of the box if inlay hints are enabled in Zed. - Semantic tokens — LSP-driven highlighting that distinguishes things tree-sitter can't see from syntax alone: user-defined functions vs built-ins, parameters vs locals vs globals, index-recognised constants, and macros. The headline win (UDF vs built-in) renders in most themes; the finer categories are theme-dependent — see Semantic highlighting.
- Document color — color swatches next to
0xRRGGBBliterals passed to known color-taking GUI functions (GUICtrlSetColor,_GUICtrlListView_SetTextColor, etc.), with correct RGB-vs-BGR decoding per function. - Folding ranges — LSP-computed folds for functions,
#Regionblocks,If/While/For/Switch/Select/Withbodies, and multi-line block comments — including#regionblocks that Zed's built-in folding can't fold. Opt-in; see Folding. - Code actions — quick-fixes on diagnostic squiggles: add a missing
#include <Lib.au3>for UDF library functions, and fix function-name casing to the canonical form. - Code formatting — reformat the current file via AutoIt3Wrapper's
/Tidymode (fixes indentation, normalises keyword/function casing). Windows-only; requires SciTE4AutoIt3. Trigger with the editor's Format Document command. - Document symbols / outline — functions,
Global/Const/Enumdeclarations,#Regionblocks. - Brackets, indentation, outline navigation — the usual editor affordances.
- 19 bundled snippets for
Func,If/ElseIf/Else,For,While,Switch,Region,MsgBox,ConsoleWrite, hot-keys, etc. - 7 task definitions for run / Au3Check / Aut2Exe compile / Aut2Exe with GUI options / Au3Info / Koda Form Designer / kill running script. Zero-config for standard installer-based AutoIt installations (registry discovery).
| Feature | Windows | macOS | Linux |
|---|---|---|---|
| Syntax highlighting | ✅ | ✅ | ✅ |
| Hover docs | ✅ | ✅ | ✅ |
| Go-to-definition | ✅ | ✅ | ✅ |
| Find-references | ✅ | ✅ | ✅ |
| Completion | ✅ | ✅ | ✅ |
| Signature help | ✅ | ✅ | ✅ |
| Inlay hints | ✅ | ✅ | ✅ |
| Document symbols / outline | ✅ | ✅ | ✅ |
| Document highlight | ✅ | ✅ | ✅ |
| Folding ranges | ✅ | ✅ | ✅ |
| Call hierarchy † | ✅ | ✅ | ✅ |
| Semantic tokens | ✅ | ✅ | ✅ |
| Document color | ✅ | ✅ | ✅ |
| Code actions | ✅ | ✅ | ✅ |
| Snippets | ✅ | ✅ | ✅ |
| Live diagnostics (Au3Check) ‡ | ✅ | ❌ | ❌ |
| Code formatting (Tidy) ‡ | ✅ | ❌ | ❌ |
| Task runners ‡ | ✅ | ❌ | ❌ |
† Call hierarchy is computed by the language server on all platforms, but Zed does not yet expose a call-hierarchy UI (zed-industries/zed#14203). It will become invokable in-editor once Zed ships one — no extension change needed.
‡ The Windows-only rows invoke AutoIt's official .exe binaries (Au3Check.exe, AutoIt3.exe, Aut2Exe.exe), which AutoIt ships for Windows only. On macOS/Linux these features are silently disabled; everything else works.
- Zed 0.180 or later (uses
schema_version = 1). - Any OS — the extension and language server build and run on Windows, Linux, and macOS. Syntax highlighting, outline, hover docs, go-to-definition, find-references, completion, and snippets work everywhere.
- Windows + AutoIt v3 installed if you want live diagnostics, code formatting, or the bundled tasks. These rely on AutoIt's Windows-only binaries (
Au3Check.exe,AutoIt3.exe,Aut2Exe.exe). AutoIt install can be:- Default installer (
C:\Program Files (x86)\AutoIt3\) — fully zero-config. - Custom installer location — fully zero-config, the registry tells us where.
- Portable / unzipped at a non-default path — set
au3checkPathin your Zed settings (see Configuration).
- Default installer (
- SciTE4AutoIt3 (the full SciTE bundle from autoitscript.com) if you want code formatting. It provides
AutoIt3Wrapper.au3andTidy.exe, which the formatter invokes. Standard SciTE4AutoIt3 installs toC:\Program Files (x86)\AutoIt3\SciTE\and are discovered automatically. - On Linux/macOS the LSP starts cleanly and serves hover, outline, go-to-definition, find-references, completion, semantic tokens, folding, document highlight, document color, and code actions; diagnostics and formatting are silently disabled. Task definitions are still installed but won't run since they invoke
*.exebinaries.
Open Zed → command palette (cmd-shift-p / ctrl-shift-p) → extensions → search AutoIt → install.
That's it for installer-based AutoIt setups. The Au3Check path is discovered automatically via the Windows registry.
All settings live under lsp.autoit-lsp.settings in your settings.json (%APPDATA%\Zed\settings.json user-wide, or .zed/settings.json per-workspace).
{
"lsp": {
"autoit-lsp": {
"settings": {
"au3checkPath": "D:\\Tools\\AutoIt3\\Au3Check.exe",
"debounceMs": 400,
"au3checkExtraArgs": "-w 1 -w 2 -d"
}
}
}
}| Setting | Default | Description |
|---|---|---|
au3checkPath |
(registry discovery) | Absolute path to Au3Check.exe. Needed only for portable / unzipped AutoIt installs at non-default locations. If set to a non-existent file, the server logs a warning and falls back to registry discovery — so a stale setting doesn't break the LSP after you install AutoIt normally. |
debounceMs |
400 |
Milliseconds to wait after the last keystroke before re-linting. Clamped to [50, 5000]. The first edit after open or save lints immediately regardless. |
au3checkExtraArgs |
"" |
Extra flags appended verbatim to the Au3Check.exe command line — type them exactly as you would on a command line. Quote-aware tokenization respects "double quotes", so a spaced path like -I "C:\My Includes" works as written. Use it to enable warning levels (-w 1 -w 2 …) or the strict undeclared-variable check (-d). Run Au3Check.exe -h for the full flag list. No validation is done — a flag that breaks Au3Check's output format is on you. Changes take effect immediately (open files re-lint on settings change). |
These features are served by the language server but controlled by Zed's own editor settings (not under lsp.autoit-lsp).
Signature help is disabled by default in Zed. Enable it by adding these two lines to your settings.json:
{
"auto_signature_help": true,
"show_signature_help_after_edits": true
}With these enabled, the parameter popup appears automatically when your cursor enters a function call's argument list and stays open as you type. You can also trigger it manually at any time with Ctrl+I (Windows/Linux) or Cmd+I (macOS) — this works regardless of the settings above.
Inlay hints (parameter name labels on call sites) are controlled by Zed's inlay_hints setting, which defaults to enabled: true in recent Zed releases. If you don't see them, check:
{
"inlay_hints": {
"enabled": true
}
}Code formatting uses AutoIt3Wrapper's /Tidy mode to fix indentation, normalise keyword and function casing, and clean up spacing. It is automatically available when SciTE4AutoIt3 is installed alongside AutoIt (the LSP detects it via the Windows registry). No configuration is needed.
Trigger formatting with Zed's standard Format Document command (alt-shift-f on Windows/Linux, option-shift-f on macOS), or via the command palette: editor: format.
The "Format Document" option only appears in the command palette when the LSP has detected all three required binaries (AutoIt3.exe, AutoIt3Wrapper.au3, Tidy.exe). If formatting does not appear, confirm that SciTE4AutoIt3 is installed.
The language server provides folding ranges for functions, #Region blocks, If/While/For/Switch/Select/With bodies, and multi-line block comments. Using these requires opting in via a Zed per-language setting — otherwise Zed uses its own indentation-based folding, which (notably) can't fold #region blocks:
{
"languages": {
"AutoIt": {
"document_folding_ranges": "on"
}
}
}With document_folding_ranges set to "on", the fold arrows in the gutter come from the LSP, and #region … #endregion blocks fold like everything else.
The language server emits semantic tokens that classify identifiers more precisely than syntax alone can — user-defined functions vs built-ins, parameters vs local vs global variables, index-recognised constants, and macros. The most visible effect is that your own functions render differently from built-in/library functions (e.g. MyHelper vs _ArrayAdd), which most themes color out of the box.
The finer distinctions (parameter vs variable, constant, macro) are theme-dependent: a theme has to define styles for the corresponding semantic token types/modifiers to color them, and many themes don't — in that case Zed falls back to the tree-sitter highlighting, with no loss compared to before. This is the same theme-dependency that applies to semantic tokens for any language in Zed.
All tasks scope to AutoIt files only and show up in the Command Palette under task: spawn. AutoIt's install directory is discovered at run-time from the Windows registry, so no editing is needed for standard installs.
| Task | What it does |
|---|---|
| AutoIt: Run filename | Runs the script, streaming ConsoleWrite() output to the terminal in real time. |
| AutoIt: Check filename (Au3Check) | Lints the file with the official Au3Check.exe — preview of what the LSP shows as you edit. |
| AutoIt: Compile filename (Aut2Exe) | Direct compile to a standalone Windows binary with defaults. |
| AutoIt: Compile filename with Options (AutoIt3Wrapper GUI) | Launches the SciTE-bundled AutoIt3Wrapper.au3 with /ShowGui so you pick icon / version info / console mode before compile. |
| AutoIt: Launch Au3Info | The window-info inspector GUI. |
| AutoIt: Launch Koda Form Designer | The drag-and-drop GUI builder bundled with SciTE4AutoIt3. |
| AutoIt: Kill filename | SciTE-equivalent of Ctrl+Break — terminates the AutoIt3.exe process running the current file. |
- Diagnostics, code formatting, and tasks are Windows-only. They invoke AutoIt's official binaries (
Au3Check.exe,AutoIt3.exe,Aut2Exe.exe), which AutoIt itself only ships for Windows. Everything else — syntax, outline, hover, go-to-definition, find-references, completion, code actions, semantic tokens, folding, document color, and snippets — works on Linux and macOS too. - Call hierarchy has no in-editor UI yet (Zed limitation — zed-industries/zed#14203). The language server fully implements it; it becomes invokable once Zed ships a call-hierarchy UI.
- No color picker (Zed limitation — zed-industries/zed#52208). Color swatches render next to
0x…literals, but clicking one doesn't open an editable picker yet. The server already answerscolorPresentation, so the picker will work as soon as Zed ships one. - Outline panel is flat (Zed limitation — the LSP emits a proper hierarchy with parameters as children of functions and contents nested under regions, but Zed's outline panel renders flat with indentation instead of expand/collapse — tracked at zed-industries/zed#23095).
- Snippets fire inside strings/comments (Zed limitation — the extension's
overrides.scmcorrectly identifies string/comment scopes and suppresses word/LSP completions there, but Zed's snippet provider doesn't currently honor the per-scope override — tracked at zed-industries/zed#21578). The existing override blocks will start working automatically once that is fixed upstream.
Diagnostics don't appear. Check that AutoIt is installed and Au3Check.exe exists. If you have a portable / non-installer AutoIt, set au3checkPath (see Configuration). The server logs Au3Check.exe not found in registry, default path, or initializationOptions.au3checkPath — diagnostics disabled to stderr if discovery fails.
Hover shows nothing on a function I defined myself. If you're hovering a call that's defined in the same file or an #included file, confirm the definition uses the standard Func Name(...) syntax and that the file has been saved (the index is built from the on-disk content). The built-in catalog covers ~3,542 documented AutoIt builtins and UDF library functions; user-defined functions show a signature popup once indexed. Macros (@CRLF, @ScriptDir, etc.) don't have hover — they're covered by completion detail strings instead.
Tasks fail with 'x86' is not recognized or similar PowerShell errors. Make sure Zed's default shell is PowerShell, not cmd.exe or bash. The tasks use PowerShell's & call operator and the registry-lookup pattern; running them through a different shell needs a workspace tasks.json override with your preferred invocation.
The squiggle lands on ) instead of the function name. Should be fixed in v0.3.0 — please file an issue with the source line and the message Au3Check produced.
"Format Document" doesn't appear / formatting does nothing. The formatter requires SciTE4AutoIt3 — the full SciTE bundle, not just the base AutoIt3 installer. Install it, then reload Zed (the LSP discovers the binaries at startup). If SciTE4AutoIt3 is installed at a non-default path, the LSP uses the Windows registry to locate it; a portable install at a custom path is not currently supported for formatting.
MIT — see LICENSE.
- The Au3Check invocation pattern and stdout-parsing regex are adapted from loganch/AutoIt-VSCode (MIT). Their prior art validated the wrapping approach.
- Builtin function metadata is derived from the official AutoIt v3 documentation at https://www.autoitscript.com/autoit3/docs/ — only structured fields (name, signature, parameters, summary, return value) are extracted, not the full prose.
- The tree-sitter grammar lives in a sibling repo: tree-sitter-autoit.
- The language server lives in a sibling repo: autoit-lsp.
