Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Garry's Mod Language ServerNew to Visual Studio Code? Get it now.
Garry's Mod Language Server

Garry's Mod Language Server

Preview

Pollux

|
1,116 installs
| (3) | Free
Advanced GLua language server for Visual Studio Code - IntelliSense, debugger, formatter, and more for Garry's Mod development.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Garry's Mod Language Server icon

Garry's Mod Language Server

Advanced Gmod GLua language server for Visual Studio Code.
Using the latest pre-release version is recommended

View on VS Code Marketplace View on Open VSX Registry

VSCode Extension Stable VSCode Extension Pre-Release GLuaLS Version
Documentation GMod Annotations GitHub Issues

[!IMPORTANT] This is an early release. There may be some minor bugs, please report any issues you run into! You should be able to resolve most issues via the config system (e.g. disabling diagnostics or changing folder paths).

Report bugs or suggest features here: https://github.com/Pollux12/gmod-glua-ls/issues

macOS support is currently experimental, expect issues!

Visual Studio Code extension for gmod-glua-ls, a rust-based language server, debugger and toolkit for Garry's Mod GLua development.

Feature overview video
Click to view the video


Core language server

Full documentation, signatures, realm, and other important information for all Garry's mod functions, including your own code (even if not annotated). Diagnostics flag any potential mistakes, helping catch errors sooner. Go to definition, find references, rename, formatting and inlay hints work the way you would expect from any language server.

Completion and hover

Completion with documentation

Realm awareness

The extension knows whether each file and function is server, client or shared, gives you relevant warnings when using the wrong realm, and only shows valid suggestions for your current realm.

Realm awareness

Network validation

The code that sends a net message and the code that receives it usually live in different files. The extension links them, warns when the two sides disagree, and helps you easily write them via autocomplete.

Net message validation

Net read completion

Hooks

The language server detects hooks, including your own custom hooks, to provide full information such as callers, autocomplete, annotations and more. Includes support for plugin hooks such as those in Helix.

Hook completion

Hook documentation

Plugin hook completion

Scripted classes and references

Entities, weapons, tools, plugins (such as in Helix), VGUI panels and other scripted classes are recognised from your folder layout. What NetworkVar and AccessorFunc create gets completion and find references like any other member. The class explorer lists your classes, materials and sounds, and templates create new ones.

Class explorer

NetworkVar references

Find references

Advanced Debugger

Debug a local SRCDS server (and/or gmod client) from VS Code instead of adding print statements. Set breakpoints, step through code and inspect variables, or run Lua and console commands on the server or client without leaving the editor.

Debugger

The entity explorer lists every entity in the game with its values and NetworkVars, and lets you edit them live.

Entity explorer

Runtime Lua errors from the game are collected in one place, and each one links to its source.

Runtime errors

Runtime error and matching diagnostic

AI agents (MCP)

Turn on the optional MCP server (off by default) and AI agents such as Claude Code, Codex, GitHub Copilot and Cursor can work with your GMod server through the debugger. They can run Lua and see what it returned, read the console and Lua errors, set breakpoints and logpoints, step through code and read locals, and check code with GLuaLS diagnostics. Run GLuaLS: Set Up AI Agent (MCP) to connect an agent. It covers the server realm and pairs well with a clientside MCP such as gmcl_mcp. See the AI agents guide.

Configuration and formatting

A settings panel lets you adjust or turn off any diagnostic that doesn't suit your codebase, without editing JSON. The built-in formatter has presets such as CFC, with the individual options available.

Settings panel

Settings panel formatter options

Workspace support

Setup is automatic for most codebases. Addon and gamemode layouts are detected, and annotations and the debugger are installed and kept up to date for you. It is built for large codebases and multi-root workspaces, such as a gamemode open alongside its addons.

Documentation is available at: https://gluals.arnux.net/


Troubleshooting

This extension uses the dedicated glua language mode. Make sure this is set for any Garry's Mod Lua files in the bottom right of VSCode (language selection). The extension will offer to do this if it detects a Garry's Mod file open without it being set to glua.

The debugger is only designed to be used on local development servers, please do not install the binary module on production servers. gm_rdb only accepts localhost connections by default. If you need remote attach, start Garry's Mod or SRCDS with -rdb_allow_remote. rdb.activate(...) keeps the server running by default. If you want it to pause on the next hook event instead, add -rdb_pause_on_activate. This extension has only been tested with VSCode and may not work with forks.

This extension is primarily designed and tested for addon and/or gamemode development setup within an SRCDS server. If you're doing something outside of this structure, some features may not work or may require manual configuration. The extension currently expects each added workspace folder root to be within either garrysmod/addons or garrysmod/gamemodes. If you need to edit multiple folders at the same time (such as gamemode alongside addons), I'd recommend adding each individual gamemode or addon as a folder within a multi-root workspace, rather than opening the entire garrysmod folder within VSCode.

If you have any advanced configuration (e.g. not using standard Garry's Mod folder structure) that seems to not work, please create an issue that details what your structure looks like, so that I can add support for it via the configuration system.


This project is based on EmmyLua Analyzer Rust and my previousLuaLS plugin.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft