Autocomplete
GLuaLS suggests GMod API functions, local variables, class members, hook names, net message names, and other symbols based on your cursor position. Triggers as you type. PressCtrl+Space to trigger it yourself.
Call snippets
When you complete a function call, GLuaLS inserts a snippet with tab stops for each parameter:.gluarc.json
Staged snippets
For GMod functions with complex signatures (hook.Add, net.Receive, timer.Create, etc.), GLuaLS generates a snippet with the expected callback body:
Postfix completions
Type a postfix trigger after an expression to insert a completion template:@. Change it in .gluarc.json with completion.postfix.
Auto-require
When you complete an identifier from another module, GLuaLS can insert arequire() at the top of the file:
.gluarc.json
Hover documentation
Hover over any GMod API function, variable, or annotated symbol to see its documentation:- Function signature with parameter names and types
- Return type
- Description (from wiki or
---comment) - Realm badge: Client / Server / Shared indicator
- Deprecation notice if applicable
Signature help
As you type function arguments, GLuaLS shows the parameter signature above the cursor, highlighting the current parameter:Go to definition
PressF12 or right-click → Go to Definition to jump to where a function or variable is defined. Works for:
- GMod API functions, which open the annotations file
- Your own functions and classes
require()d modules
Shift+F12) finds every use of a symbol across your workspace.
Symbol renaming
PressF2 to rename a variable, function, or field. GLuaLS applies the rename across all files in your workspace, including string-based accesses when references.fuzzySearch is enabled.
Document outline
The outline view (Ctrl+Shift+O) shows the structure of the current file. With GMod analysis enabled, outline verbosity is controlled by gmod.outline.verbosity:
| Level | What is shown |
|---|---|
minimal | Functions, classes, VGUI panels, hooks, net receivers, timers, concommands only |
normal (default) | Same as minimal, plus non-primitive variables and typed tables |
verbose | All locals, assignments, and control-flow blocks |
Semantic highlighting
GLuaLS provides semantic token coloring that extends your theme’s base Lua syntax highlighting with additional information:- Parameters are colored differently from locals
- Class members are highlighted based on their owning class
- Deprecated symbols appear with a strikethrough
- Globals are distinguishable from locals
semanticTokens.enable in .gluarc.json.
Code lens
Code lens annotations appear above functions and class definitions:- References count: how many places call this function
- VGUI panel indicator: links to the panel definition for VGUI components
codeLens.enable and gmod.vgui.codeLensEnabled in .gluarc.json.
VSCode integration
Code intelligence features work in VS Code after the extension starts. Use the settings panel or.gluarc.json to configure autocomplete, hover documentation, and go-to-definition. See Completion settings and Hints & Hover settings for the full reference.