/pico8-ls

PICO-8 Language Server

Primary LanguageTypeScriptMIT LicenseMIT

PICO-8 Language Server

VS Marketplace installs VS Marketplace downloads

Full language support for the PICO-8 dialect of Lua.

The goal is to have all the features you'd expect in a full-fledged language server, such as the one for Lua, but specifically tailored for a frictionless PICO-8 experience.

Feature highlights

View docs on hover, then auto-complete and signature help:

docs gif

Full support for #include statements:

include gif

Features

  • Syntax highlighting
  • Syntax errors
  • Warnings on undefined variable usage
  • Find symbol in document
  • Go to definition
  • Find references
  • Hover support & signature help for built-in functions
  • Auto-completion
  • Support for #includeing other files
  • Snippets for common idioms (functions, loops, etc) as well as pico-8 symbols (p8-jelpi -> 🐱, p8-x-key -> ❎, etc)
  • Code formatting

Support for other platforms

This extension uses the Language Server Protocol, so while it's mainly made for VSCode, it could also be used for other editors such as NeoVim, Atom, etc.

I don't have any experience setting up language extensions for platforms other than VSCode, so currently looking for help with that. See tips and support thread on the issue for various editors:

Changelog

Changelog has been moved to a separate file.

Development

Please follow the official Language Server Extension Guide to understand how to develop VS Code language server extension.

Credits

PICO-8 Lua parser based on https://github.com/fstirlitz/luaparse (heavily updated & ported to Typescript by @japhib)

PICO-8 by Lexaloffle Games