Skip to main content
GLua Language Server is a VS Code extension that turns your editor into a full IDE for Garry’s Mod Lua (GLua). It ships with 5,586 API entries from the Garry’s Mod wiki, so you get completions, type tracking, and diagnostics without needing an internet connection. The extension also understands GMod’s unique runtime concepts, including server/client/shared realms, net message payloads, and hook signatures.

Installation

Install from a .vsix package or build from source in minutes.

Quickstart

Take a five-minute tour of completions, realms, and net messages.

Configuration

Tune diagnostics, formatting, and inline suppressions to match your project.

Rules Reference

Browse every diagnostic rule the language server can enforce.

Feature highlights

The extension resolves types as you type, so completions include the right methods for your variables. It tracks 331 globals, 1,257 library functions, 2,376 class methods, 1,069 panel methods, 100 enums, and 72 structures from the bundled wiki dataset.
GLua files run on the server, the client, or both. The extension flags code that calls a server-only API inside a client file, or vice versa, so you catch realm mismatches before you test in-game.
When you send a net message on the server, the extension checks that the client reads the same payload types in the same order. Mismatched WriteString / ReadUInt pairs are caught early.
With 551 hook signatures in the dataset, the extension validates hook names and argument counts. You get completions for hook parameters and warnings for incorrect signatures.
Format GLua with a dedicated formatter that understands GMod conventions. Configure it through .gluafmtrc.json, .editorconfig, or .prettierrc.

Performance

The extension is built for large codebases. Here are measured results on a 932-file, 232,000-line gamemode:

Activation

GLua Language Server does not claim every .lua file on your machine. It activates only on Garry’s Mod workspaces, or when you explicitly enable it. The status bar shows the current mode:
  • GLua · Server
  • GLua · Client
  • GLua · Shared
  • Plain Lua
If you see Plain Lua in a GMod project, click the status bar item or set glua.activation to always.