Setup
packages/glua-lsp/examples/my_addon
with the extension loaded. lua/autorun/sh_mistakes.lua in there is wrong on
purpose — one mistake per diagnostic, so you can see what each looks like.
Scripts
Run from the repository root.Tests
The suite covers the parser, analysis and features, the formatter, config resolution, and performance budgets.pnpm run test:plain uses Node’s default
reporter if you would rather have machine-readable output.
Three test properties are worth knowing about, because they are what keeps
changes honest:
The parser must never hang or throw
The parser must never hang or throw
Garbage input is fed in directly. Any statement that fails to consume a token
forces a resynchronise, so a malformed file cannot spin the server.
Formatting must not change meaning
Formatting must not change meaning
Every formatter test re-parses its own output and compares the syntax tree
against the original with positions stripped. It also asserts idempotence and
that no comment was lost.
Interactive work has a time budget
Interactive work has a time budget
Completion, diagnostics and re-analysis are asserted against millisecond
budgets on a 2,000-line file, so a change that makes typing feel slow fails
the suite rather than being noticed later.
Benchmarking
The most useful tool in the repo. Point it at a real addon or gamemode:number, and the nested-callback
scraping bug — none of which the unit tests would have caught.
Colour palette
packages/glua-lsp/tools/palette.mjs holds the project’s colours as hex values
in one place, so the test reporter, the benchmark and this site all use the same
ones rather than inventing their own.
Terminal output honours
NO_COLOR and disables itself when piped.
Cutting a release
Releases go to GitHub Releases, not the Marketplace. The whole flow is one command plus a push:release bumps packages/glua-lsp/package.json, commits, and creates an
annotated v<version> tag. Pushing the tag triggers the release workflow, which
typechecks, tests, builds, packages, and attaches the .vsix to a new release
with notes generated from the commits since the previous tag.
The workflow refuses to build when the tag and the manifest version disagree.
That is the mistake the script exists to prevent — a release whose filename
says one version and whose contents say another.
v0.2.0-beta.1) is published as a prerelease.
--dry-run shows what would happen without writing anything. Actions → Release
→ Run workflow does a build-only run without tagging.
Docs
This site is Mintlify. To preview it:docs/, and navigation lives in docs/docs.json.