Lua language server for Defold projects: flow-sensitive type checking, Defold engine and library zip APIs without hand-written stubs, completion, navigation and an always-aligning formatter.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Type checking that follows the code: a field checked for nil stays checked,
and assert helpers narrow without annotations.
The engine API for your Defold version, downloaded once. Set it in
.luadls.json at the project root:
{"defold": "1.13.2"}
Library dependencies are read straight from the zips Defold fetched into
.internal/lib, and open read-only. When game.project names one that
isn't fetched, a notification offers Fetch Libraries, as the Defold
editor does.
luacheck-style checks: unused locals, shadowing, unreachable code, and more.
A formatter that keeps your lines and always aligns =, table fields and
trailing comments.
Disable other Lua extensions in the workspace, or every problem is reported
twice.
The bundled luadls binary is also a command line tool: luadls check,
luadls fmt, luadls hover file:line:col and more. Run luadls help.