Language support for TyranoScript (.ks files) in the Zed editor.
- Syntax highlighting (tags, attributes, comments, labels, text)
- Auto-closing brackets (
[],"") - Comment toggling (
;) - Tag name and parameter completion (via Language Server)
- Asset file completion for
storage=""(bgimage, fgimage, bgm, etc.) - Label completion for
target="" - User-defined macro completion
- Hover documentation for tags and parameters
- Go to Definition — labels, JS label calls, macros, scenario files, and
tf.xxx - Find References — all usages of labels, JS label calls, macros, and
tf.xxx - Diagnostics
- Missing required parameters (error)
- Missing file references (warning)
- Undefined tag/macro (warning)
- Undefined label references (warning)
- Unused labels (warning)
- Per-line suppression via
; tyranoscript-disable-next-line
Search for "TyranoScript" in Zed's Extensions panel.
- Clone this repository
git clone https://github.com/void2610/tyranoscript-zed.git
- Open Zed → Extensions → Install Dev Extension
- Select the cloned folder
- Open a
.ksfile to verify highlighting
; comment
*label_name
[bg storage="bg_room.png" time=1000]
[chara_show name="hero" pos=center]
春子「こんにちは!」[l]
[if exp="f.flag == 1"]
フラグが立っています。
[endif]
- Tag names (
bg,chara_show) → function color - Control tags (
if,endif,macro) → keyword color - Attribute names (
storage,time) → property color - Attribute values (
"bg_room.png",1000) → string color - Comments (
; ...) → comment color - Labels (
*label_name) → label color
- Tree-sitter grammar: parsed by tree-sitter-tyranoscript
- Language Server: tyranoscript-lsp (
@void2610/tyranoscript-lsp) — editor-agnostic LSP server - Zed extension (WASM): Rust-compiled WASM binary manages LSP server installation and launch
Tag dictionary data is based on tyrano.Tooltip.json from orukRed/tyranosyntax.
- tyranoscript-lsp — Language Server (editor-agnostic)
- tree-sitter-tyranoscript — Tree-sitter grammar