This repository scrapes the Garry's Mod Lua API and generates snippets that will help provide autocompletion for Lua in editors like VSCode, NeoVim and more.
-
Install Lua Language Server: for your editor of choice:
-
Open the Lua Language Server Addon Manager with the key combination
Ctrl+Shift+P
(orCmd+Shift+P
on macOS) and search for Addon, then select Lua: Open Addon Manager ...: -
You will now get autocompletion for the Garry's Mod Lua API in your Garry's Mod projects.
Alternatively download the latest release and include or symlink it into your workspace. Get the release from 🔗 the releases page it's named something like YYYY-MM-DD_HH-MM-SS.lua.zip
.
Using GitHub Actions, this repository is automatically updated every first day of the month at around 00:00 UTC.
A workflow will automatically scrape the latest Garry's Mod Lua API from the Garry's Mod Wiki and package them into 🔗 a release.
Note
The Lua Language Server addon may not be 100% up-to-date with the definitions in this repository. You can help us out by updating it for everyone. There are instructions on how to do this in the
CONTRIBUTING.md
file.
You can clone this repository and run the scraper yourself. This is useful if you want to use the latest version of the API, or if you want to make changes to the scraper.
-
Clone this repository
-
Install the dependencies with
npm install
-
Run the scraper with
npm run scrape-wiki
This project uses Jest to automate testing. You can run the tests with npm test
.
The API is also available as JSON. You can find it with the Lua API package on the releases page. It is named something like YYYY-MM-DD_HH-MM-SS.json.zip
.