Skip to main content
A VS Code extension for GMod Lua. The Garry’s Mod wiki is bundled — 5,586 entries — so completion, type tracking and diagnostics work offline, and cover the things generic Lua tooling has no idea about: server, client and shared realms, net message payloads, and hook signatures.
This is an unofficial, community-maintained project. It is not affiliated with, endorsed by, or supported by Facepunch Studios.

Installation

Install from a .vsix, from a registry, or build from source.

Quickstart

A five-minute tour of completion, realms and net messages.

Configuration

Committed config files, editor settings, and inline suppressions.

Rules Reference

Every diagnostic the linter reports, what it catches, and why.

What it does

Types propagate through calls, string literals, loops and metatables, so the completion list on any variable is the methods that variable actually has. The dataset behind it: 331 globals, 1,257 library functions, 2,376 class methods, 1,069 panel methods, 100 enums and 72 structures.
A file’s realm is read from its path and narrowed inside if SERVER then blocks. Calling Player:Kick from a clientside file is reported where you write it, not left for someone to find in-game.
Each net.Start is paired with its net.Receive across files and their write/read sequences compared. Writing an Entity and reading a UInt on the other end is caught before the message runs.
551 hook signatures. Names complete, typos are flagged with a quick-fix suggestion, and callback parameters take their types from the signature without you annotating anything.
Reprints from the syntax tree. It refuses to touch a file that does not parse, never drops a comment, and leaves idiomatic one-liners like if not IsValid(ent) then return end alone. Configured with .gluafmtrc.json, .editorconfig or .prettierrc.

Performance

Measured on a 932-file, 232,000-line gamemode:

Activation

GLua does not claim every .lua file on your machine. It attaches to Garry’s Mod workspaces, and to anything else only when you ask it to. 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.

A note on how this was built

AI assistance was used throughout this project, from the parser to these docs. It isn’t meant to be a big, load-bearing tool — it’s a project built to understand how language servers and CLIs actually work, from the inside.