Automatically generates GLuaLS annotations for Garry's Mod API by scraping the GMod Wiki. These annotations are consumed by gmod-glua-ls.
Plugins are currently WIP and are not used.
Note: This repository is part of the GMod language server infrastructure. Annotations are automatically downloaded by the VSCode extension from generated publish branches - manual setup is not required.
npm run scrape-wiki scrapes and normalizes wiki pages, then writes Lua annotations into output/.
mainis for stable annotations.- Publishes base annotations to
gluals-annotations - Publishes plugin annotations to
gluals-annotations-plugin-<plugin-id>
- Publishes base annotations to
betais for pre-release annotations.- Publishes base annotations to
gluals-annotations-prerelease - Publishes plugin annotations to
gluals-annotations-prerelease-plugin-<plugin-id>
- Publishes base annotations to
- Do not edit the generated output branches by hand. Make changes on
mainorbetainstead. - Generated output branches keep their old commits, so users can choose an older annotation commit if needed.
Requirements:
- Node.js
>= 21
Install dependencies:
npm ciGenerate annotations locally:
npm run scrape-wikiRun tests:
npm testBuild a release ZIP locally (old workflow, not needed for normal extension downloads):
npm run pack-releaseFor local language server testing, use the override setting in the VSCode extension to point annotations to your generated local output folder.
src/scrapers/- GMod wiki scraping and normalizationsrc/api-writer/- EmmyLua/LuaCATS annotation generationplugin/- framework plugin data and gluarc files used by the VSCode extensioncustom/- manual fixes added during generationoutput/- generated annotation files before they are published
The VSCode extension loads plugin data from the annotation bundle (plugin/index.json + plugin/<id>/plugin.json).
Based on luttje/glua-api-snippets