Install
glua for linting and
formatting, and glua-lsp for the language server. The wiki
dataset is bundled, so neither needs a network connection.
Check it starts:
Neovim
Withnvim-lspconfig, define the
server once and attach it to Lua files inside Garry’s Mod projects.
Helix
Inlanguages.toml:
Zed
In your settings, point the Lua language at the binary:Sublime Text
With LSP installed, add toLSP.sublime-settings:
Anything else
The server speaks LSP over stdio and takes the usual transport flags (--stdio, --node-ipc, --socket=<port>). Point your client at:
Settings
Editors that supportworkspace/configuration can send the same settings the
VS Code extension uses, under the glua key. Everything on the
configuration page applies.
If your client does not send configuration, the server falls back to its
defaults, and a committed .glua.json still
works — it is read from disk rather than from the editor.
Fixing on save
The server offers asource.fixAll code action that applies every safe fix in
the file at once — the same set glua lint --fix writes, so an editor and a
pre-commit hook cannot disagree about what “fix it” means.
VS Code settings.json
Material call out of HUDPaint is offered from the lightbulb, where you can
see the result, and by glua lint --fix --unsafe-fixes where you asked for it —
never silently on save. The same goes for rewriting != to ~=: != is valid
GLua, so that is a preference rather than a fix, and it stays a refactor you
invoke.
What you do not get
Two things are VS Code commands rather than language server features, so they are unavailable elsewhere:- The net message graph (
GLua: Show Net Message Graph), which renders in a webview - The realm status bar item and its click-to-toggle activation