Skip to content

Latest commit

 

History

History
93 lines (64 loc) · 6.83 KB

README.md

File metadata and controls

93 lines (64 loc) · 6.83 KB

Garry's Mod Lua API Definitions

GitHub Release GitHub License GitHub Tests Action Test Coverage Status All Contributors

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.

🔨 Usage

  1. Install Lua Language Server: for your editor of choice:

  2. Open the Lua Language Server Addon Manager with the key combination Ctrl+Shift+P (or Cmd+Shift+P on macOS) and search for Addon, then select Lua: Open Addon Manager ...: VSCode editor command suggestion showing: Lua: Open Addon Manager ...

  3. Search for the Garry's Mod addon and Enable it: Lua Language Server Addon Manager showing the Garry's Mod addon

  4. You will now get autocompletion for the Garry's Mod Lua API in your Garry's Mod projects.

VSCode showing autocomplete options from the GLua API while typing code with EmmyLua

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 .

📅 Automatically up-to-date

Using GitHub Actions, this repository is automatically updated on the first day of every month at approximately 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 might not be immediately updated to align with the definitions in this repository. This delay occurs because we must submit a pull request (PR) to the Lua Language Server Addons repository (LuaLS/LLS-Addons) to update the addon. Subsequently, a maintainer of the LuaLS/LLS-Addons repository needs to find time to review and merge the PR.

Our schedule for updating our addon with LuaLS/LLS-Addons is set for the first day of each even month, specifically: February, April, June, August, October, and December. This schedule is subject to change based on the availability of maintainers and the urgency of the update.

If you urgently require the most current definitions from the addon, you can expedite the process by submitting a PR to update it. Instructions for doing so can be found in the CONTRIBUTING.md file.

🤖 Advanced Usage

Running the Scraper Locally

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.

  1. Clone this repository

  2. Install the dependencies with npm install

  3. Run the scraper with npm run scrape-wiki

Testing the project

This project uses Jest to automate testing. You can run the tests with npm test.

API as JSON

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.

Contributors

luttje
luttje

💻
Aske
Aske

💻
Vurv
Vurv

💻
jason
jason

🤔
_AMD_
_AMD_

🐛
[aka]bomb
[aka]bomb

🐛 💻
Rubat
Rubat

💻
Techbot121
Techbot121

🐛