https://github.com/thacuber2a03/playdate-luals
A LuaLS addon for the Playdate API
https://github.com/thacuber2a03/playdate-luals
lua luals playdate playdate-sdk
Last synced: about 1 year ago
JSON representation
A LuaLS addon for the Playdate API
- Host: GitHub
- URL: https://github.com/thacuber2a03/playdate-luals
- Owner: thacuber2a03
- License: mit
- Created: 2024-03-11T14:32:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-27T20:54:59.000Z (almost 2 years ago)
- Last Synced: 2025-03-12T08:37:29.615Z (over 1 year ago)
- Topics: lua, luals, playdate, playdate-sdk
- Language: Lua
- Homepage:
- Size: 2.29 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Playdate Lua API Definitions
This is an addon for LuaLS that helps with autocompletion for Playdate's Lua API.
> **Warning**:
>
> Currently, this addon is handwritten, so there might be errors in the implementation
> of certain features. Inside Playdate also doesn't explain some of its contents, such
> as the `class` function, which means that only approximations to the behavior of said
> elements are able to be supplied.
>
> The addon is still in development and there are no stable releases yet, so annotations
> and other things will change at any time. It's not totally good for use yet, so PRs
> would be appreciated.
[showcase.webm](https://github.com/thacuber2a03/playdate-luals/assets/70547062/8125a249-492e-4a54-91a3-c22b88721109)
## Installation
Currently this addon is not available in the Lua Addon Manager, so manual
installation is required. To install manually, clone this repository under
your addons folder. Then add the location of the `library/` subfolder to
your workspace settings, inside the `Lua.workspace.library` field, and add
all the settings in the [config.json](config.json) file:
```json
{
"Lua.workspace.library": [
"/path/to/playdate",
],
"Lua.runtime.special": {
"import": "require"
},
"Lua.completion.requireSeparator": "/",
"Lua.runtime.nonstandardSymbol": [
"+=", "-=", "*=", "/=", "//=", "%=",
"<<=", ">>=", "&=", "|=", "^="
],
"Lua.runtime.version": "Lua 5.4",
"Lua.runtime.builtin": {
"io": "disable",
"os": "disable",
"package": "disable"
},
"Lua.workspace.library": [
"$PLAYDATE_SDK_PATH/CoreLibs"
],
"Lua.hover.expandAlias": false
}
```
## Currently implemented
- Table extensions
- Main callbacks
- Some graphics objects and functions
- Some global variables and `class`
- Some display functions
- Some timing objects and functions
### Disclaimer
This addon is not affiliated with or endorsed by Panic. Playdate, sdk.play.date and the Playdate console are copyright of Panic.