- ludic-fmt: `rows[i]`, `new []int`, `s[a..b]`, `emit(`, `~x`, list-literal
and query-tag braces stay tight; member calls hug their paren
(`Date.new(`, `Prefab.spawn(`); `<< >> & | ^ ~` are operators and
`&& ||` are not — mirrored in ludic_syntax.h, LudicLexer.kt and the
TextMate grammar. 149 of 274 tracked sources failed --check before.
- ludic-lsp: `initializationOptions.compilerDiagnostics` / `compilerPath`
are honoured — on save the document's compilation unit is compiled and
`file:line: error: msg` is published as a "ludicc" diagnostic (the
option had been documented but never implemented); the workspace scan
file is per process; bracket codes spelled as char literals
- Overlay added to LUDIC_PHASES, LudicTokens.kt, ludic-mode.el and the
grammar (the game uses it; check-vocabulary flagged the drift)
- editors: VS Code snippets/package.json/extension.js (`${workspaceFolder}`
and `~` expansion, PATH lookup, Apache-2.0, real repo URL), Neovim root
markers, Helix/Zed/Sublime bin/ paths, Emacs vocabulary, JetBrains
comments; tools/editors/README.md no longer describes C tooling
- .forgejo workflows clone `${{ github.server_url }}/${{ github.repository }}`
so a fork or mirror tests itself; the docs publish pushes the same way
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
110 lines
3.4 KiB
JSON
110 lines
3.4 KiB
JSON
{
|
|
"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."
|
|
}
|
|
}
|