Skip to main content

What GLuaLS provides

GLuaLS has two parts:
  • a language server that works in LSP-compatible editors
  • a VS Code extension with extra GMod tools, settings UI, and debugger

Code intelligence

These features work in any LSP-compatible editor, not just VS Code.

Code intelligence

Autocomplete, hover docs, go-to-definition, renaming, code lens, semantic highlighting

Diagnostics

Error checking, type mismatch warnings, unused variables, GMod-specific diagnostics

Formatting

Built-in formatter with presets, style overrides, and external tool support

Inlay hints

Parameter names, variable types, block-end labels, inline debug values

GMod-specific features

Realm awareness

Client/server/shared detection, cross-realm warnings, Realm View panel

Network validation

Validates net.Start/net.Receive payloads, catches type and order mismatches

Hook intelligence

Autocomplete for hook.Add, hook.Run, parameter inference, custom hook tracking

VGUI support

Panel type inference, code lens, custom panel registration

Classes

Scripted classes

Automatic ENT/SWEP/EFFECT detection, NetworkVar synthesis, Class Explorer, scaffolding, custom class scopes

Debugger

Debugger overview

Full SRCDS debugger with breakpoints, stepping, and variable inspection

Entity explorer

Browse server entities and edit properties while paused

Lua execution

Run Lua on the server directly from VS Code

Error tracking

Capture runtime Lua errors from SRCDS with clickable stack traces

AI integration

AI integration

MCP server lets GitHub Copilot run Lua, read errors, and query your server

VSCode extension commands

Access all extension commands through the Command Palette (Ctrl+Shift+P):
CommandDescription
Open GLuaLS SettingsOpen the interactive .gluarc.json settings panel
Restart Lua ServerRestart the language server without reloading the window
Configure DebuggerRun the debugger setup wizard
Run GLua FileExecute the current file on the connected SRCDS server
Run Selected GLuaExecute the current selection on the connected server
Run CommandSend a console command to the server
Update GLuaLS AnnotationsManually trigger an annotations update

Status bar

The status bar at the bottom of VS Code shows the current language server state:
  • GLuaLS: Ready — the server is running and analysis is up to date
  • GLuaLS: Indexing — the server is scanning your workspace files
  • GLuaLS: Error — the server encountered a problem (click for details)
When the debugger is connected, the status bar also shows the current realm and connection state.

Configuration

Most settings live in .gluarc.json at your workspace root. You can use the settings panel (GLua: Open Settings) or edit JSON directly. Extension-level settings (annotation downloads, UI preferences) are under gluals.* in VS Code settings. See Configuration overview for details.