A set of Lua scripts for parsing Defold documentation and generating annotation files compatible with Lua Language Server.
By design, it can be run on Windows, macOS and Linux. Only Lua needs to be installed. The Lua language was chosen because it allows all Defold users to contribute to this project.
Generated annotations are available on the Releases page.
These annotations are used by Defold Kit, a Visual Studio Code extension for developing games with Defold.
This repository has an action workflow that checks the latest version of Defold daily and automatically generates and releases the new version of annotations if required.
But if something goes wrong and edits are needed, there will be an additional manual update in the release.
Install Lua and run the main.lua
script.
$ lua main.lua
By default it generates the annotations for the latest version of Defold. But you can also specify the Defold version as an argument.
$ lua main.lua '1.5.0'
As a result, you will see the api
folder with .lua
files. These are the annotations.
If you find a typo in the annotations or outdated meta information, please comment to issue #4. I try to collect annotation errors there, and then prepare a pull request to Defold source code, as this is the main source of documentation.
Otherwise, on parsing and generation problems, craete a new issue.
There is a launch config for tomblind/local-lua-debugger-vscode to debug with breakpoints.
It's also useful to turn the config.clean_traces
to true
in config.lua
file to avoid deleting temporary files.
- json.lua by rxi
- htmlEntities-for-lua by Tiago Danin
- defold-api-emmylua (Java) by Dmitry Popov
- defold-lua-annotations (C#) by Dennis Shendrik