Skip to content

ncocchiaro/playdate-docdef

 
 

Repository files navigation

playdate-docdef

What am I looking at?

Unofficial LuaCATS types for the PlayDate API:

This repository contains the Playdate Lua API specification and tools for generating Lua Comment And Type System (LUACats) compliant Lua comments for use with the Lua Language Server (sumneko.lua) in VSCode, NeoVIM, etc.

These tools can optionally integrate the offical Playdate Docs into the generated output by scraping the API docs either locally (e.g. "~/Developer/PlaydateSDK/Inside Playdate.html") or directly from https://sdk.play.date to generate a fully annotated stub.lua

Usage / Contributing

If you have Playdate type annotation changes/addition just edit Playdate.luars and then run cargo run > stub.lua to see the changes reflected.

For the complete set of annotations: cargo run -- annotate > stub_annotated.lua

See: DESIGN.md for more.

I'm happy to accept corrections/additions to my PlaydateSDK API type annotations or the rats nest of novice rust code.

License

Copyright (c) 2023 Peter Tripp

This project is licensed under the Apache License, Version 2.0 or the MIT license at your option.

About

PlayDateSDK - Generate LuaCATS Annotations

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Lua 77.2%
  • Rust 22.8%