AMXX Pawn All-In is a Visual Studio Code extension for AMX Mod X / Pawn development. It brings syntax highlighting, semantic hovers, completion, rename support, live diagnostics, include-aware analysis, and compiler integration into one focused workflow for AMXX Pawn projects.
Recommended AMX Mod X version: 1.9.0 or newer.
Features
Language & Syntax
- AMXX Pawn syntax highlighting for source files and compiler-recognized include files, with configurable file extensions.
- Automatic Pawn language detection for custom file extensions when a file includes Pawn headers and contains Pawn-specific syntax, while avoiding documentation and C/C++ snippets.
- TextMate grammar support for AMXX Pawn declarations, enums, tags, macros, preprocessor directives, comments, strings, and compiler-style include forms.
- Built-in AMXX/Pawn compiler constants and preprocessor symbols such as
__FILE__and__LINE__are understood in expression/preprocessor contexts.
Includes & Preprocessor
- Include-aware declarations, symbols, functions, enums, stocks, natives, forwards, macros, and project/global include paths.
- Compiler-style include resolution for
.inc,.p,.i,.pawn, plus configurable extra include suffixes such as.inl. - Correct quoted-vs-angle include search semantics: quoted includes prefer the current source directory first, while angle includes use configured/project include roots.
#includeand#tryincludesupport for diagnostics, context, go to definition, and include path completion.#define, function-like macros, object-like macros, conditional#if/#ifdef/#elseif/#else/#endif,#pragma,#error, and#assertanalysis for live diagnostics.- Preprocessor directive completion after
#, including AMXX Pawn#pragmavariants with descriptions. - Macro-aware local analysis for function-like macros that expand into common control/declaration patterns.
Completion
- Fast completion for functions, natives, variables, arguments, enum fields, compiler symbols, preprocessor directives, include paths, and include declarations.
- Scope-aware completion that understands the current function/block, so local variables and arguments are suggested only where they are actually visible.
- Context-aware filtering: top-level function declarations prefer forwards, function-call contexts hide declaration-only forwards, and declaration keywords avoid noisy duplicate suggestions.
- Completion ordering prefers active micro-scope locals from nested blocks, branches, and
fordeclarations, then regular function locals, function arguments, globals, and include declarations. - Function-call completion avoids duplicating an already typed argument block, does not expand call snippets inside strings, and uses clean parameter-name placeholders for calls.
- Function-like
#definecall snippets can reuse argument descriptors from nearby docs blocks, including tagged/array forms such asFloat:origin[3], instead of falling back to genericarg1,arg2,arg3placeholders. - Configurable call snippet argument mode: insert all arguments or only required arguments before the first default value.
- Forward completion can generate a new implementation body while preserving the full forward signature for declarations.
- Deprecated declarations are marked in completion items when source metadata exposes them.
- Fuzzy/partial symbol matching helps find names even when only a compact abbreviation is typed.
- Array dimension completion suggests numeric defines, enum constants, and compile-time size helpers where they are valid.
- Optional completion auto-hide reduces UI noise after idle typing or when the typed text already resolves the only suggestion.
Hover & Navigation
- Semantic hover for globals, locals, function arguments, functions, includes, enum members, struct-like enum fields, bitmasks, array/indexed access, macro aliases, and call signatures.
- Hover can show inferred initializer/array shapes, enum-backed dimensions, bitmask values, function signatures, source include names, and validation context.
- Hover modes: normal hover, disabled hover, or experimental Ctrl/Shift/Alt-only modes for Windows.
- Compact/full/signature-only hover content modes.
- Optional Go to Definition links inside hover content.
- Go to Definition support for symbols and include declarations.
- Format-string placeholder hover/highlighting that maps placeholders such as
%s,%i,%f, and multi-argument%Lto the arguments they consume. - Document highlights for symbol occurrences, including variables and functions, using VS Code's built-in highlight/overview behavior.
Refactor
- Rename Symbol support for local variables, function arguments, current-file globals, current-file functions, and unresolved scoped names in the edited source.
- Scope-aware reference matching to avoid renaming unrelated symbols with the same name in another function/block.
- Include declarations are intentionally not renamed.
- PawnDoc stub generation for undocumented
nativeandforwarddeclarations in include files. - PawnDoc quick action generation at the current cursor/selection for declarations or a selected code block.
- PawnDoc generation asks each run whether to create a backup, skip backup, or cancel.
Live Diagnostics
- Live validation in
editedorfullmode. - Live validation issue modes: errors only or errors and warnings.
- Compiler-like diagnostics for common Pawn errors: missing/extra arguments, tag mismatches, array dimension issues, invalid indexed access, invalid statements, invalid characters, preprocessor issues, enum/initializer problems, lvalue/const issues, return-style problems, unreachable code, deprecated symbols, unused symbols, and more.
- Configurable include validation mode for balancing strict include checks with real-world AMXX include usage.
- Configurable callback signature mode for strict or compiler-like forward callback checks.
- Configurable unused
stockvalidation mode. - Detection of invalid non-Pawn characters outside strings/comments.
- Dynamic stack usage warning that can suggest increasing
#pragma dynamic.
Integrations
- AMXX compiler integration with a toolbar command, configurable compiler path, output directory, compiler options, result toasts, output reveal behavior, and diagnostic reveal priority.
- Compiler include paths are passed in the same project/global priority order used by the extension, with duplicate
-ioptions filtered out. - AMXX Builder integration: when
amxbis installed and anamxbuild.yml,amxbuild.yaml, or suffixedambuild.*.yml/.yamlmanifest is present in the project root, the editor title can runamxb build. Command palette helpers can initialize a manifest with selectableamxb initoptions or open the installer command in a terminal.
Performance & Caching
- Include graph and diagnostics caches for faster repeated analysis.
- Persistent include declaration cache with dependency stamps.
- External include watching, including tracked resolved includes.
- Optional include document warmup for smoother first hovers/completions after opening a script.
- Version-aware diagnostics/context caches to keep edited-file feedback responsive.
Themes & Localization
- Bundled color themes tuned for AMXX Pawn hovers and diagnostics:
- AmxxPawnAllIn Olive
- AmxxPawnAllIn Dark
- AmxxPawnAllIn Light
- AmxxPawnAllIn Graphite
- AmxxPawnAllIn Aurora
- UI localization for English and Russian using the standard VS Code NLS mechanism.
Installation
Install from Visual Studio Marketplace
The recommended installation path is the Visual Studio Marketplace:
https://marketplace.visualstudio.com/items?itemName=Faktor.amxx-pawn-all-in
You can also install it from inside VS Code:
- Open the Extensions view.
- Search for
AMXX Pawn All-In. - Click
Install.
Marketplace installs receive normal VS Code extension updates.
Install from a VSIX release
Use this path for manual/offline installs or test builds:
- Download the latest
.vsixfile from the repository Releases page: https://github.com/droads/VSC-Amxx-Pawn-All-IN/releases - Open Visual Studio Code.
- Open the Extensions view.
- Click the
...menu in the top-right corner. - Choose
Install from VSIX.... - Select the downloaded
.vsixfile. - Reload VS Code if prompted.
You can also install from the command line:
code --install-extension amxx-pawn-all-in-*.vsix
Quick Start
- Open an AMXX project folder in VS Code.
- Open a
.sma,.inc,.p,.i,.pawn,.inl, or configured include file. - Configure include paths if your project uses custom include folders:
{
"amxxPawnAllIn.projectLocalIncludePaths": ["include"],
"amxxPawnAllIn.globalIncludePaths": []
}
- Enable live validation if desired:
{
"amxxPawnAllIn.liveValidationMode": "edited",
"amxxPawnAllIn.liveValidationIssueMode": "errors-and-warnings",
"amxxPawnAllIn.liveValidationTypingDelayMs": 700
}
- Configure the compiler path if you want to compile directly from VS Code:
{
"amxxPawnAllIn.globalCompilerPath": "C:/path/to/amxxpc.exe"
}
Then use the AMXX Pawn All-In: Compile Current File command or the editor title button.
If your project uses AMXX Builder, put an amxbuild.yml, amxbuild.yaml, or suffixed ambuild.*.yml/.yaml manifest in the workspace root and install amxb.
When the builder is available, AMXX Pawn All-In: Build with AMXX Builder appears in the editor title for AMXX Pawn files and runs amxb build from the project root.
If several builder manifests are present, the command asks which one to use.
For new projects, use AMXX Pawn All-In: Initialize AMXX Builder Manifest from the command palette; it lets you select amxb init options such as package name, plugin file, workflow, .gitignore, and deploy .env stubs.
For include API files, use AMXX Pawn All-In: Generate PawnDoc Stubs from the editor title button or command palette to add basic PawnDoc blocks above undocumented native and forward declarations. For a single declaration or selected code block in any AMXX Pawn file, use AMXX Pawn All-In: Generate PawnDoc Here from the command palette or VS Code code actions.
Important Settings
-
amxxPawnAllIn.fileExtensionsSource file extensions. Defaults to[".sma"]. -
amxxPawnAllIn.includeFileExtensionsExtra include file extensions used for Pawn include resolution and language activation. Compiler-style include suffixes are always enabled and cannot be removed:.inc,.p,.i,.pawn. The default extra suffix is.inl. -
amxxPawnAllIn.detectPawnLanguageByIncludesDetect Pawn files by resolved Pawn#includeusage plus Pawn-specific syntax even when the file extension is custom. Documentation and common C/C++ files are ignored. -
amxxPawnAllIn.projectLocalIncludePathsProject-relative include directories. Defaults to["include"]. -
amxxPawnAllIn.globalIncludePathsGlobal include directories. -
amxxPawnAllIn.liveValidationModeoff,edited, orfull. -
amxxPawnAllIn.liveValidationIssueModeerrors-onlyorerrors-and-warnings. -
amxxPawnAllIn.liveValidationTypingDelayMsDelay before live validation runs after typing. Increase it if temporary diagnostics appear while a token is still being entered.0means validate only after the edit crosses a line boundary or the cursor leaves the edited line. -
amxxPawnAllIn.hoverModedisabled,normal,ctrl-hack,shift-hack, oralt-hack. The*-hackmodes are experimental Windows-only modes that try to show the extension hover only while the selected modifier key is held; on other platforms they fall back to normal mode. -
amxxPawnAllIn.hoverContentModefull,compact, orsignature-only. -
amxxPawnAllIn.completionEnabledEnable or disable completion provider. -
amxxPawnAllIn.completionForwardDeclarationStyleControls whether forward suggestions at top level insert only a signature, a same-line body, or a next-line body. The same brace placement is used by statement snippets such asif,else,for,while,switch,case, anddefault, and by Enter-assisted bodies for manually typed function declarations. -
amxxPawnAllIn.completionCallArgumentModeControls whether call snippets insert all arguments or only the required arguments before the first default value. -
amxxPawnAllIn.completionAutoHideDelayMsAutomatically hides the completion widget after this many milliseconds without another completion request.0keeps VS Code's normal behavior. Empty results and a single already fully typed suggestion are hidden automatically. -
amxxPawnAllIn.callbackSignatureModestrictkeeps full forward-backed callback signature checks.compiler-likeis more tolerant of partial callback signatures and unused forward callback parameters. -
amxxPawnAllIn.persistentIncludeDeclarationCacheMaxMBDisk cache limit for include declaration and include graph snapshots.0disables this cache. -
amxxPawnAllIn.documentContextCacheFileLimitIn-memory document context cache file limit. -
amxxPawnAllIn.externalIncludeWatchModeControls how external include files are watched and invalidated.
Compiler Integration
The extension can run amxxpc for the current file.
It can use a compiler from the current project, from the source file directory, or from amxxPawnAllIn.globalCompilerPath, depending on your configuration.
When compiling, AMXX Pawn All-In passes configured include folders to amxxpc as include paths.
Project-local include paths are emitted first, global include paths follow, and duplicate folders are removed by absolute path.
Quoted includes still keep compiler-style local-file lookup first; angle includes rely on the configured project/global include path order.
Managed include and output arguments are protected from amxxPawnAllIn.compilerOptions: duplicate include paths are skipped, unique manual include paths are kept after managed paths, and custom -o options cannot override the configured output file.
Compiler output can be written to a configurable output directory, and the extension can reveal live errors, compiler errors, warnings, or all issues depending on your workflow.
Localization
AMXX Pawn All-In supports English and Russian using the standard VS Code localization system:
package.nls.jsonfor English extension metadata.package.nls.ru.jsonfor Russian extension metadata.localization/en.jsonfor runtime strings.localization/ru.jsonfor runtime strings.
VS Code chooses the UI language according to its configured locale.
Performance Notes
The extension uses shared document snapshots, include graph caching, persistent include declaration caching, dependency stamps, and version-aware diagnostics caching. Caches are invalidated when documents, includes, nested includes, settings, or watched external include files change.
For most projects, edited live validation gives the best balance between responsiveness and safety.
Use full mode when you want the most aggressive continuous validation.
Supported File Types
Primary file types:
.sma.inc.p.i.pawn
When an include is written without an extension, for example #include <test>, AMXX Pawn All-In follows the compiler-style include suffix list and checks .inc, .p, .i, and .pawn before any extra configured suffixes. .inl is only a default extra include suffix and can be removed from amxxPawnAllIn.includeFileExtensions. Custom source and extra include extensions can be configured in VS Code settings.
Include path completion follows the same search semantics: quoted includes prefer files relative to the current source before configured include roots, while angle includes use configured/project include roots.
Repository Layout
extension.jsThin VS Code activation entrypoint.bootstrap/Runtime wiring and feature composition.core/Shared parsing, syntax, declaration, validation, include, and document-context logic.features/User-facing VS Code features such as hover, live validation, completion, rename, and persistent hover.services/Settings, localization, compiler integration, cache maintenance, and infrastructure.syntaxes/TextMate grammar.themes/Bundled AMXX Pawn themes.localization/Runtime localization files.
Status
This project is under active development. The goal is practical, fast, include-aware AMXX Pawn tooling with compiler-like diagnostics where it is useful for live editing.