Skip to content

Latest commit

 

History

History
51 lines (30 loc) · 1.52 KB

README.md

File metadata and controls

51 lines (30 loc) · 1.52 KB

pico-api

pico-api is a project consisting of definition files for the sumneko/lua extension for VSCode, allowing you to write PICO-8 or Picotron programs with the support of modern editor features.

Setup

  1. Install and enable sumneko/Lua extension in VSCode Marketplace

    extension

  2. Download pico-api

  3. New a folder .vscode in your workspace, and put the file setting.json into it

    folder

  4. Change the field Lua.workspace.library in .vscode/settings.json to the path to the folder picotron(or folder pico8, depending on the type of your project)

    path

  5. New a cartridge and use this snippet at the top of its code:

    -- picotron
    cd("/myproj")
    include("main.lua")
    -- pico8
    #include main.lua

Then you can write code in the workspace of VSCode and enjoy code prompts, formatting, AI copilot, etc.

preview

Issues

Picotron Shorthand is not completely supported.

!= operator and shorthand assignment operators (like +=, -=, etc) can be used now. Thanks to @arnaught.

This is a very rough version. Welcome to submit issues and PRs.

Reference

https://marketplace.visualstudio.com/items?itemName=sumneko.lua

https://github.com/ahai64/pico-api

https://www.lexaloffle.com/bbs/?tid=53227