- Tree-sitter Query 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| examples | ||
| languages | ||
| .gitignore | ||
| CHANGELOG.md | ||
| extension.toml | ||
| LICENSE | ||
| README.md | ||
| THIRD_PARTY_NOTICES.md | ||
GB Assembly for Zed
RGBDS / RGBASM syntax support for Game Boy and Game Boy Color assembly.
Repository name: zed-rgbasm
Zed extension name: GB Assembly
Extension id: rgbasm
Important: replaces the separate Assembly extension
Zed grammars are registered globally by grammar name. Both this extension and
DevBlocky/zed-asm would otherwise own a grammar named asm.
For that reason, do not install both extensions at the same time.
This extension owns asm once and exposes two languages:
- Assembly —
.asm,.s,.S - GB Assembly —
.rgbasmand.rgbinc
You keep normal Assembly syntax support while gaining a separate RGBASM file type.
Install as a dev extension
- Uninstall Assembly Language Server / Assembly (
DevBlocky/zed-asm). - Uninstall any older dev version of GB Assembly.
- Restart Zed once, so the old global
asmgrammar is unloaded. - Extract this repository.
- In Zed, run Extensions: Install Dev Extension.
- Select this repository directory (the directory containing
extension.toml). - Open
examples/demo.rgbasm.
Expected result:
- Language picker contains both Assembly and GB Assembly.
demo.rgbasmautomatically selects GB Assembly..asm,.s, and.Sfiles select Assembly.
Why v0.1.x failed
v0.1.0 registered another grammar named asm, colliding with the installed
Assembly extension.
v0.1.1 tried to reference the grammar owned by the other extension. That
avoided the collision but did not give this extension a reliable grammar to
register its own language against.
v0.2.0 uses one grammar owner and two language definitions, avoiding both
failure modes.
Grammar
The extension pins the same known-working grammar revision used by the DevBlocky Assembly extension:
RubixDev/tree-sitter-asm04962e15f6b464cf1d75eada59506dc25090e186
The generic grammar is deliberately used only as the parser layer. The
GB Assembly language has its own syntax query and its own .rgbasm and .rgbinc file
association.
If it still does not appear
Run zed: open log and search for:
rgbasmGB Assemblycompiling grammar asmfailed to compile grammarfailed to load language
The dev-extension card appearing by itself only proves that the extension manifest was discovered; grammar compilation/language registration errors are reported separately in the Zed log.
Important installation note
This extension bundles the asm Tree-sitter grammar itself and provides both Assembly and GB Assembly. Uninstall other extensions that also register a grammar named asm before installing this dev extension. No asm-lsp is required.
For .rgbasm and .rgbinc files, Zed should automatically select GB Assembly.