zed-poryscript
A Zed extension for Poryscript, the scripting language used by the pokeemerald / pokeruby / pokefirered decomp communities for Pokemon ROM hacks.
What you get
- Syntax highlighting via
tree-sitter-poryscript(full language coverage: control flow, labels, text/movement/mart blocks,poryswitch, typed strings,const, everything). - Full LSP support via
poryscript-ls, a native Rust language server:- Diagnostics (parse errors)
- Completions (commands, constants, symbols, keywords)
- Hover documentation (command docs from
.incfiles, constant values) - Go to definition (same-file and cross-file)
- Find references and rename (workspace-wide)
- Document symbols / outline
- Signature help for command parameters
- Semantic tokens highlighting
- Code formatting
- Code actions ("did you mean?" suggestions)
- Inlay hints (autovar results, parameter names)
- Folding ranges
- Zero-config install: the extension downloads
poryscript-lsfrom GitHub releases on first load. Nothing to build, nothing to put on yourPATH.
Install
From the Zed Extension Gallery
(Not yet published — will appear after the extension is accepted into
zed-industries/extensions.)
As a dev extension (until then)
git clone https://github.com/chris-wilson-1/zed-poryscriptIn Zed:
- Open the command palette (
cmd-shift-p/ctrl-shift-p). - Run
zed: install dev extension. - Pick the cloned
zed-poryscriptdirectory.
Open any .pory file. You should see:
- "Poryscript" in the status bar.
- Keywords, strings, and commands highlighted.
- A language-server process starting (look in
zed: open log).
How it works
Zed ──(LSP over stdio)──> poryscript-lsThe extension downloads a single poryscript-ls binary and launches
it over stdio. The language server reads the filesystem directly and
gets the workspace root from the standard LSP initialize request —
no shims or proxies needed.
Configuration
The extension provides default configuration for standard decomp project layouts:
{
"CommandIncludes": [
"asm/macros/event.inc",
"asm/macros/movement.inc"
],
"CommandConfigFilepath": "tools/poryscript/command_config.json",
"FontConfigFilepath": "tools/poryscript/font_config.json"
}Known limitations
- x86 (32-bit) not supported. Linux/macOS/Windows on x86_64 and arm64 are.
- First-run latency. The first
.poryfile you open triggers a GitHub download. Subsequent opens are cached.
License
MIT.