Package Control

The Sublime Text package directory, rebooted.

LSP-pawnforge

Sublime Text LSP helper package for PawnForge (AMX Mod X Pawn Language Server)

Links

Versions

1.0.4 (>ST4000) ·
2026-09-24 21:01

More

LSP-pawnforge

Sublime Text helper package for PawnForge (AMX Mod X Pawn Language Server).

GitHub Release License Sublime Text 3 & 4

🖱️ Optional: Enable Ctrl + Click for Go to Definition

By default in Sublime Text, Ctrl + Click adds multi-cursors, while F12 goes to definition out of the box.

If you prefer Ctrl + Click to jump to definitions (like in VS Code), create or open: Preferences > Package Settings > LSP > Mouse Bindings (or Packages/User/Default (Windows).sublime-mousemap):

[
  {
    "button": "button1",
    "count": 1,
    "modifiers": ["ctrl"],
    "press_command": "drag_select",
    "command": "lsp_symbol_definition",
    "context": [
      {
        "key": "selector",
        "operator": "equal",
        "operand": "source.pawn, source.amxx, source.amxxpawn"
      }
    ]
  }
]

⌨️ Shortcuts & Navigation

Shortcut Action Notes
Ctrl + B Compile Plugin (amxxpc.exe) Built-in Sublime build system
F12 Go to Definition Native LSP shortcut
Shift + F12 Find All References Native LSP shortcut
Ctrl + Space Trigger Autocompletion AMXX 1.10 & ReAPI natives

💡 Tip for F9 (AMX-Studio style build): If you prefer F9 to compile instead of Ctrl + B, add this to Preferences > Key Bindings (Packages/User/Default (Windows).sublime-keymap):

[
  {
    "keys": ["f9"],
    "command": "pawn_build",
    "context": [{ "key": "selector", "operator": "equal", "operand": "source.pawn, source.amxx, source.amxxpawn" }]
  }
]

🌟 Overview

LSP-pawnforge integrates the PawnForge Language Server into Sublime Text using the official LSP package.

It brings enterprise-grade Pawn language intelligence to Sublime Text scripters with zero manual configuration:


✨ Features


🚀 Installation

Prerequisites

  1. In Sublime Text, open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P).
  2. Type Package Control: Install Package and press Enter.
  3. Install LSP (if not already installed).
  4. Install a Pawn syntax highlighting package so .sma and .inc files are recognized under the source.pawn scope:

Installing LSP-pawnforge

  1. Open the Command Palette (Ctrl+Shift+P).
  2. Run Package Control: Install Package.
  3. Search for LSP-pawnforge and press Enter.

Option B: Manual Installation (Git Clone)

Clone this repository directly into your Sublime Text Packages directory:

Windows:

cd "$env:APPDATA\Sublime Text\Packages"
# (or for Sublime Text 3: "$env:APPDATA\Sublime Text 3\Packages")
git clone https://github.com/NiceFeatures/LSP-pawnforge.git

Linux:

cd ~/.config/sublime-text/Packages
git clone https://github.com/NiceFeatures/LSP-pawnforge.git

Restart Sublime Text and open any .sma or .inc file!


⚙️ Configuration

Opening Settings

You can open the PawnForge configuration at any time:

This opens the default settings on the left (read-only reference) and your user settings on the right (Packages/User/LSP-pawnforge.sublime-settings).


1. Include Paths Configuration

To add your AMX Mod X include folders (e.g. amxmodx.inc, cstrike.inc, ReAPI):

User Global Settings (Packages/User/LSP-pawnforge.sublime-settings)

{
  "settings": {
    "includePaths": [
      "include",
      "C:/HLDS/cstrike/addons/amxmodx/scripting/include"
    ]
  }
}

Per-Project Settings (your-project.sublime-project)

If you work with different server directories per project, define them inside your project file:

{
  "folders": [
    {
      "path": "."
    }
  ],
  "settings": {
    "LSP": {
      "LSP-pawnforge": {
        "settings": {
          "includePaths": [
            "${project_path}/include",
            "C:/HLDS/cstrike/addons/amxmodx/scripting/include"
          ]
        }
      }
    }
  }
}

2. Available Settings Reference

Setting Type Default Description
includePaths array ["include"] List of paths to search for .inc files (workspace-relative or absolute).
globalIncludePaths array [] Additional include directories applied globally across all projects.
compiler.executablePath string "" Path to amxxpc.exe compiler binary.
compiler.includePaths array [] Include paths specifically passed to the compiler.
compiler.options array [] Extra CLI options passed to compiler (e.g. ["-O2"]).
compiler.outputPath string "" Directory where compiled .amxx binaries should be saved.
language.reparseInterval number 300 Debounce delay in milliseconds before reparsing the file upon typing.
language.webApiLinks boolean false Enable clickable links to AMX Mod X Web API docs in hover tooltips.

📜 License

This project is licensed under the GNU General Public License v3.0.

Results

Packages