Overview
GLuaLS supports VGUI, GMod’s panel GUI system. It understandsvgui.Create() calls and the panel inheritance hierarchy, and it provides IDE features for VGUI development.
Panel type inference
When you callvgui.Create("Type"), GLuaLS types the returned value as the matching panel class:
Code lens
Whengmod.vgui.codeLensEnabled is true, GLuaLS shows code lens annotations above panel creations and definitions.
Enable in .gluarc.json:
.gluarc.json
Inlay hints for :Add()
When using panel:Add("Type"), GLuaLS shows the panel type in an inlay hint:
Custom panels
GLuaLS understands the standard VGUI inheritance pattern used to define custom panels:vgui.Register(name, PANEL, base), GLuaLS recognizes "MyPanel" in later vgui.Create("MyPanel") calls. The panel type includes all methods from the PANEL table plus inherited DPanel methods.
Scripted Entity Explorer
The Scripted Class Explorer lists VGUI panels for navigation. Click a panel class in the explorer to open its definition.VSCode integration
VGUI features work after the extension starts. The Class Explorer sidebar shows registered panel types under the Classes section. Configure VGUI support in the settings panel. See GMod settings for the full reference.Configuration
| Setting | Default | Description |
|---|---|---|
gmod.vgui.codeLensEnabled | true | Show code lens on panel creations/definitions |
gmod.vgui.inlayHintEnabled | false | Show inlay hints for panel:Add() type inference |