{ "program": { "prefix": "program", "body": ["program ${1:Name} {", "\t$0", "}"], "description": "A program: one block of declarations that compiles to an executable." }, "property": { "prefix": "property", "body": ["property ${1:Name} { ${2:x}: ${3:int} = ${4:0} }"], "description": "A property: typed fields with defaults — a per-entity component, or a record made with `new`." }, "model": { "prefix": "model", "body": ["model ${1:Name} { ${2:Position} }"], "description": "An entity kind bundling a fixed set of properties." }, "prefab": { "prefix": "prefab", "body": ["prefab ${1:Name}: ${2:Model} { ${3:Stats} { ${4:hp}: ${5:30} } }"], "description": "A model with preset property fields; `spawn` adds only what differs." }, "handler": { "prefix": "handler", "body": [ "handler ${1:Name} phase ${2|Start,Input,FixedUpdate,Update,LateUpdate,Render,Overlay|} {", "\t$0", "}" ], "description": "A handler that runs once per tick in its phase." }, "handler with query": { "prefix": "handlerq", "body": [ "@Queries(these: [${1:Position}])", "handler ${2:Name} phase ${3|Update,FixedUpdate,LateUpdate,Render,Input|} {", "\t$0", "}" ], "description": "A handler whose body runs once per matching entity, each property bound by name." }, "for query": { "prefix": "forq", "body": ["for (${1:p}) in query [${2:Position}] {", "\t$0", "}"], "description": "Iterate every entity matching a query." }, "spawn": { "prefix": "spawn", "body": ["spawn ${1:Kind} { ${2:Position} { ${3:x}: ${4:0} } }"], "description": "Create an entity of a model or prefab." }, "scene": { "prefix": "scene", "body": [ "scene ${1:Name} {", "\ton enter { $2 }", "\tlayer ${3:Main} {", "\t\t$0", "\t}", "}" ], "description": "A scene with lifecycle hooks and one layer of handlers." }, "ui": { "prefix": "ui", "body": [ "ui ${1:Name} {", "\tpanel id: ${2:Root} pad: 16 gap: 6 align: center {", "\t\t$0", "\t}", "}" ], "description": "A retained UI tree, declared as data." }, "match": { "prefix": "match", "body": ["match ${1:x} {", "\t${2:0} => { $3 }", "\t_ => { $0 }", "}"], "description": "Pattern match." }, "machine": { "prefix": "machine", "body": [ "machine ${1:state} {", "\tstate ${2:Idle} {", "\t\t$0", "\t}", "}" ], "description": "A state machine over an enum-typed variable; `become` transitions." }, "event": { "prefix": "event", "body": ["event ${1:Name} { ${2:amount}: int = 0 }"], "description": "An event payload; fire it with `emit`, listen with `@On`." }, "listener": { "prefix": "on", "body": ["@On(${1:Event}) handler ${2:Name} { $0 }"], "description": "A listener on an event, its payload fields bound by name." }, "namespace": { "prefix": "namespace", "body": ["namespace ${1:Name} {", "\texport function ${2:method}() -> ${3:void} { $0 }", "}"], "description": "A block of functions callable as Name.method(); `internal` keeps a helper private." }, "extern function": { "prefix": "extern", "body": ["extern function ${1:name}(${2:a}: ${3:int}) -> ${4:int} = \"${5:c_symbol}\""], "description": "Bind a C symbol through the FFI." } }