lovr-docs
lovr-docs copied to clipboard
Luau/Teal/LuaLS Type Definitions
We could use the data in this repository to generate type annotations for Lua variants like tl and Luau.
Here's a version of it for LÖVE https://github.com/MikuAuahDark/love2d-tl
type annotations for luals would also be nice
Some LuaLS definitions already exist here, but it might be a good idea to start generating them here in lovr-docs so that they are kept up to date.
This is basically done! LuaLS definitions are generated from the main docs and will automatically be kept up to date:
- The docs script has a system for "generators" now. The existing generator (that writes
api/init.lua) is called the Lua generator. - Added a new LuaLS/LuaCATS generator based on the script in #154.
- Added a new GitHub actions workflow that generates cats definitions and publishes them to a new
catsbranch. This is because LuaLS requires addons to follow a specific folder structure.- LLS-Addons could point their lovr submodule at the cats branch so that installing LÖVR with the addon manager grabs these new definition files.
Other generators could be added in the future (Teal, TypeScriptToLua, Luau, HTML, etc.).