Pawn Helper adds lightweight editor support for Pawn projects in Visual Studio Code.
Features
- Registers Pawn files with
.pwn,.inc, and.moduleextensions. - Highlights color literals written as
0xRRGGBB,0xRRGGBBAA, and{RRGGBB}. - Highlights any named
#definethat contains a color value, including0xRRGGBB,0xRRGGBBAA,{RRGGBB},RRGGBB, andRRGGBBAA. - Allows named color variable/define highlighting to be disabled separately from raw color literals.
- Adds Ctrl+Click links for paths after
#include. - Shows inline value hints next to uses of named
#define,const, and enum constants with simple integer or float values. - Provides go to definition for indexed Pawn symbols, including
Namespace::Functionnames. - Semantically highlights namespaced symbols so
Namespace::Functionis not confused withtag:Name. - Highlights compiler OOP syntax and provides Ctrl+Click navigation for classes, constructors, class methods, class fields, and class object variables.
- Indexes functions, globals, defines, enum members, and dialog declarations.
- Supports paired navigation between
globalimplementations andforeigndeclarations. - Highlights SQL keywords and
mysql_formatplaceholders such as%i,%e,%d, and%sinside SQL string literals. - Suggests ready-made SQL snippets after
INSERT,UPDATE,DELETE, andSELECTinformatand MySQL query string arguments. - Warns when
mysql_formatplaceholder counts do not match the provided value arguments. - Links MySQL query callbacks back to the
mysql_tquery,mysql_pquery, ormysql_function_querycall that references them. - Adds
Pawn Helper: Generate Enum from CREATE TABLEfor creating Pawn enum constants from a selected SQL table schema. - Adds
Pawn Helper: Reindex Workspacefor manually rebuilding the workspace index.
Settings
livePawnHelper.colors.enabled: enable or disable color highlighting.livePawnHelper.colors.variables.enabled: enable or disable highlighting for named color variables and defines.livePawnHelper.constants.valueHints.enabled: enable or disable inline value hints for numeric constants.livePawnHelper.definitions.enabled: enable or disable go to definition.livePawnHelper.sql.highlighting.enabled: enable or disable SQL string highlighting.livePawnHelper.sql.diagnostics.enabled: enable or disablemysql_formatplaceholder diagnostics.livePawnHelper.index.include: workspace glob patterns used for indexing.livePawnHelper.index.exclude: workspace glob patterns ignored during indexing.livePawnHelper.index.maxFiles: maximum number of Pawn files to index.livePawnHelper.index.debounceMs: delay before rebuilding the index after file changes.
Local Development
Run the syntax check:
npm run check
Build a local VSIX package:
npm run package
Install the generated .vsix from the Extensions view with Install from VSIX....