Skip to content

astrochili/defold-annotations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Defold Annotations

Workflow Release License Website Mastodon Twitter Telegram Buy me a coffee

A set of Lua scripts for parsing Defold documentation and generating annotation files compatible with Lua Language Server and EmmyLua.

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.

Use case

These annotations are used by Defold Kit, a Visual Studio Code extension for developing games with Defold.

Automatic Releases

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.

Manual Generation

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.

Contribution

Issues

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.

Debug

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.

Third-party

Alternatives

About

Defold annotations generator for Lua Language Server

Resources

License

Stars

Watchers

Forks

Languages