Skip to main content

What is GLuaLS?

GLua Language Server (GLuaLS) is a language server and toolkit for Garry’s Mod, built on top of EmmyLua Rust. GLuaLS works out of the box. Install the extension, open your GMod Lua project, and start coding. If you need custom settings, use the built-in settings panel.

Install

Install and set up the GLua VSCode extension; includes quickstart steps.

Annotations Reference

Reference for EmmyLua/LuaCATS annotations supported by GLuaLS.

Workspace setup

Configure VSCode and your workspace for the best GLuaLS experience.

Core features

Realm awareness

Detects client/server/shared realms from filenames, includes, and API usage. Warns about cross-realm mistakes in real time.

Network validation

Validates net.Start/net.Receive payloads, catches mismatched write/read types, and delivers smart completion.

Scripted class support

Detects ENT, SWEP, TOOL, and custom classes. Synthesizes NetworkVar getters/setters and AccessorFuncs.

Hook intelligence

Autocomplete for hook.Add, hook.Run, and GM: overrides. Registers custom hooks.

Integrated debugger

Full SRCDS debugger with breakpoints, variable inspection, live entity explorer, and Lua execution straight from the editor.

AI integration

Use Copilot and the built-in MCP tools to run Lua, read console output, and fetch server errors.

Example: what GLuaLS catches

GLuaLS catches GMod-specific mistakes that generic Lua tools miss:
-- sv_example.lua (server-side file)

-- Warning: draw.SimpleText is a clientside-only function
draw.SimpleText("Hello", "DermaDefault", 0, 0, Color(255, 255, 255))