VS Code extension
On this page
An extension (packages/vscode) for writing .lim scenarios in VS Code, by hand or with AI.
It also works in editors that can load the same extensions as VS Code, such as Cursor.
Installing
- Search for “Liminalia” in the VS Code Extensions view and install it (VS Code Marketplace)
- Open the folder that contains
liminalia.json, and open a.limfile
To install from a .vsix, download liminalia-<version>.vsix from the releases page (each Studio release includes it),
choose “Extensions: Install from VSIX…” in VS Code’s Command Palette, and select that .vsix.
To build it yourself, run npm run -w @liminalia/vscode package to make packages/vscode/liminalia-<version>.vsix (see “Building” below). To reinstall, follow the same steps; the new version overwrites the old one.
What it does
- Highlighting: labels
# name, commands@name key=value, comments//, dialogue speakersName「…」andName "…", inline markup{r 漢字|かんじ}(ruby, small reading aids above characters){br}{= expression}{b …}{@command …}, choice lines- text -> target key=value,(expression)values, strings, times, colors, and fixed line IDs#line:…at the end of a line (dimmed like comments) - Checks: shows the same check results as
lim checkwhile you write. Open files are checked with their unsaved contents, and other files with their contents on disk. Findings incast.json,liminalia.jsonand translation files (lang/<language>.json) are shown in those files too - Completion
- Command names after
@(with summaries, including@definein that file and in files loaded with@use) - Command parameter names (
key=) and values for their types (allowed values,true/false, characters, sprite sets, variants, positions, asset files) #label, files andfile#labelfor jump targets (@jump@call, after->in choices, parameters of the jump target type)- Speaker names at the start of a line (
speakersincast.json; the bracket is inserted too, or the quotation-mark formName "…"in a project whose source language is English, where the first entry oflanguagesisen) - Inline markup after
{in text - In expressions (after
@if@elif@while@set@let@return, in a parameter’s(…), and in{= …}in text), variables (those used in scripts,variablesinliminalia.json, andsystem.…, whose values the engine sets) and expression functions (with their signatures). Inventory item names (itemsinliminalia.json) insideitem("…"), and jump targets insidevisits("…")read("…")
- Command names after
- Hovers: for a command name, the summary, an example and the parameter table; for
key=and unnamed parameters, that parameter’s description. In expressions, a function’s signature and description, a variable’s initial value and how many places write and read it, the name and description of the item initem("…"), and where the jump target invisits("…")is - Go to Definition: jump targets (
#label,file,file#label), files in@use, and calls to macros defined with@define(including those in files loaded with@use). Jump targets are found and resolved the same way as Studio’s “Go to Jump Target” (⌘-click, F12) (goto.tsin@liminalia/lang) - Outline: labels and
@define - Find references (⇧F12, “Find All References”): every place that uses the scene (label), script file, macro (
@define), variable, character, speaker or asset at the cursor. Jump targets are resolved the same way as in Go to Definition.{@chara …}{= …}{img …}in text are included too - Workspace symbols (⌘T): the scenes and
@definein all of the project’s scripts (for a project directly in a workspace folder, even before you open a .lim) - Completion and hovers for settings: applies JSON Schemas (
packages/project/schemas, made from the types) toliminalia.json,cast.jsonand translation files (lang/*.json), for completing item names, descriptions, and squiggles under unknown items. Translation files are only checked when they havelanguageandlines(the shapelim i18nand Studio write) (schemas/lang-file.schema.json, so that other projects’lang/*.jsonget no squiggles; writing"$schema"applies it even before there arelines) - Folding: from the parser. Scenes (from a label to just before the next label; trailing blank lines and comments go with the next scene),
@if(each@elif@elsebranch separately),@while,@with,@choice,@define,@script, commands with a body (@html,@staff-rollwithoutfile=), and runs of//lines - Toggling
//comments, and auto-closing brackets「」『』()""{} - Formatting (“Format Document”, ⇧⌥F): tidies command lines the same way as
lim fmt(formatLimin@liminalia/lang). The text isn’t changed. If there’s a syntax error, it doesn’t format and shows why. This extension is set as the default formatter for.lim - Quick Fix (the light bulb, ⌘.): applies diagnostics that come with a suggested fix (
DiagnosticFix: replacing a misspelled name, deleting an unneeded line and so on). Before applying, it checks that the line is still the same (applyFixin@liminalia/lang; the same as “Fix” in Studio) - Rename (F2): rewrites the name at the cursor and every place that uses it. The rewriting is the same as renaming in Studio and
lim rename(@liminalia/studio/label-rename,label-follow,name-rename,asset-rename)- Scenes: on the name in a label line, or on a jump target that points to a label (
#label, the label part offile#label, choices, parameters of the jump target type). It updates references in other files andentry,afterLoadand the extras’ jump targets inliminalia.json, moves translation keys (lang/<language>.json), locked voice numbers (voice-lock.json), review comments (reviews/), flowchart card positions and jump targets inside project data whose shape a plugin declared over to the new name, and renames the baseline images oflim regress - Script files: on the file part of a jump target, or on a file in
@use. It rewrites jump targets,liminalia.json, translation andvoice-lock.jsonkeys, review comments and Studio’s notes (bookmarks and so on), and renames the .lim, its change history folder (.liminalia/history/) and the baseline images - Macros: on the name in
@define, the command name of a call, or the macro name in@with. It rewrites@define, the calls (including{@…}in text) and the keys ofcommandDefaultsinliminalia.json - Variables: on
game.…system.…temp.…in expressions,@setand{= …}. It rewrites scripts, initial values and conditions ("if") inliminalia.json, and breakpoint conditions - Characters: on a parameter of the character type (
@chara Yuika …, including{@chara …}in text). It rewrites scripts, keys incast.json, face crops and notes, and who voices the system voices - Speakers: on the name at the start of a dialogue line. It rewrites dialogue lines,
speakersandspeakerincast.json, speaker names in translations, and keys and speakers invoice-lock.json - Assets: on the value of a parameter of an asset type, or in
{img …}(the new name is a path inside the folder of the same kind, and the extension doesn’t change). It rewrites scripts (including asset parameters of macros and@with, and commands in text), commands in text and{img …}in translations, sprite images incast.json, assets inuiextraitemsofliminalia.json, andurl()and@importin the project’s CSS, and renames the asset file. Places it can’t rewrite (text passed to expressions, data, translations, templates, plugins and so on) are listed in a warning (the same aslim rename … asset; up to 10 places, with all of them in the Liminalia output) - For lines whose text was rewritten (
{= variable},{@chara …},{@macro},{img …}), translation keys andvoice-lock.jsonkeys are moved to the new key of the same line
- Scenes: on the name in a label line, or on a jump target that points to a label (
- Script tests: lists the script tests in the workspace (
tests/*.limtest) in VS Code’s Testing view (by file, with each# nameline as a test. They’re listed again when you edit them, and unreadable lines show as an error on the file). Running them runslim test --jsonfor each project (limis found the same way aslim studiofor “Play from Here” below), and shows whether each test passed, and the lines that didn’t match and why, on the test and on that line. You can also run them from the start of a# nameline in the editor..limtestfiles are highlighted too (syntaxes/limtest.tmLanguage.json). Scripts and tests being edited are saved before running. In an untrusted workspace, theliminside the project doesn’t run (src/testing.ts,src/extension-tests.ts) - Play from Here (right-click, ⌘⌥P / Ctrl+Alt+P): like “Play from Here” in Studio, opens a player in the browser that starts from the state right before the cursor line runs (the background, sprites, BGM and variables set
in earlier scenes and other files). The save is put together the same way as in Studio (
findPlayStartin@liminalia/studio/play-from): for a line the current route doesn’t pass through, it looks for a route that does, and if there’s none, it starts from the state of an earlier line and says so. For lines it can’t start from, such as inside a macro (@define), it starts at the beginning of that scene with variables at their initial values and fast-forwards to the cursor line’s page (?start=file#label&skip=N). It uses the dev server of a Studio that has the project open (the Studio app orlim studio;.liminalia/studio-server.jsonin the project). If there’s none, you choose “Open in the Studio app” or “Start lim studio”, and it waits for it to start (src/studio-launch.ts;npxisn’t used, so that nothing else is fetched from npm). The Studio app is looked for in theliminalia.studioAppsetting, or if that’s empty, in/Applicationsand~/Applicationson Mac and in%LOCALAPPDATA%\ProgramsandProgram Fileson Windows, and it’s opened with the project folder. For lim, theliminalia.limsetting (scripts such aslim.mjsrun with Node:liminalia.node, or if that’s empty, the one bundled with VS Code), or if that’s empty,@liminalia/cliin the project’snode_modules, is run in a terminal without going through a shell. If neither is found, it tells you to setliminalia.lim. The state at each line (where play is) comes from the dev server’sGET /sweep(andGET /sweep/reach); when there’s no Studio or it doesn’t respond, the same thing (@liminalia/studio/sweep) is built inside the language server (plugin commands run only if they could be loaded inside the language server). The save it makes is handed to the dev server (POST /play-from), and from that page the browser moves to/?play=1&from=<id>&start=<scene>. With an older Studio app that can’t hold saves, it opens with the same fast-forward as before - UI text (command names, Quick Fix, refusals) follows VS Code’s display language, Japanese or English (
package.nls.json,package.nls.ja.json). Command descriptions in completion and hovers are shown in the same language too (the English comes fromsummaryEnanddocEnin command definitions; plugin commands with no English are shown in Japanese)
Command specs are gathered from the built-in commands, the standard commands (@liminalia/std) and the commands of the plugins in plugins of the project.
Plugins are often written in TypeScript as is, so if one can’t be loaded inside the extension, it’s loaded again in a separate process
(using tsx if it can be found from the project. By default, the Node.js bundled with VS Code is used, and you can change it with the liminalia.node setting). If it still can’t be loaded, the reason is shown in
“Liminalia” in the Output panel, and findings about unknown commands become warnings. In untrusted folders and for projects outside the workspace folders (a .lim opened outside the workspace), plugin code isn’t run.
In an untrusted workspace, Play from Here doesn’t run the lim inside the project either (in node_modules, or a setting that points inside the project), and the lim studio it starts
doesn’t load plugins (LIMINALIA_RESTRICTED=1). The liminalia.lim, liminalia.node and liminalia.studioApp settings don’t use workspace values until you trust the workspace
(“Opening in restricted mode” in plugins.md).
The extension reloads when you change the settings, characters or plugins. If it doesn’t reload properly, run “Liminalia: Restart Language Server” from the Command Palette.
Building
npm install
npm run -w @liminalia/vscode build # bundle into packages/vscode/dist/ (esbuild)
npm run -w @liminalia/vscode package # build, then make a .vsix (@vscode/vsce)
- The extension side (
src/extension.ts) becomesdist/extension.cjs, and the language server (src/server.ts) becomesdist/server.mjs.@liminalia/lang, the runtime (@liminalia/runtime) and the standard commands are bundled into the language server, so the .vsix works without the engine’s repository - The logic behind completion, hovers, Go to Definition and checks is in
src/features.tsandsrc/model.ts, and can be tested without VS Code (parsing a partly written line and resolving jump targets useline-syntax.tsandgoto.tsin@liminalia/lang, shared with Studio) (packages/vscode/test/; they run withnpx vitest runat the root of the repository) - To try it during development, you can also open
packages/vscodein VS Code and start the Extension Development Host from “Run and Debug” (run build first)
Publishing to the Marketplace and Open VSX
The .vsix that package makes is ready to publish (the icon resources/icon.png, UI text in Japanese and English, the repository, categories and keywords).
The extension ID is liminalia.liminalia (the publisher is liminalia, and the name in the distributed package.json is liminalia).
- License:
licenseinpackages/vscode/package.jsonisSEE LICENSE IN LICENSE(the same as the npm packages), andscripts/package.tsputs the repository’s LICENSE (the terms of use) in the .vsix. The copyright notices and license terms of the bundled dependencies (vscode-languageclient and others) are collected byscripts/build.tsfrom esbuild’s metafile intoTHIRD-PARTY-NOTICES.txt, which goes in too (scripts/third-party-notices.ts; the build stops if a dependency has no license file) - Repository:
repositoryandbugspoint to the public repositoryskyt-a/liminalia-sdk(copied withscripts/public-mirror.mjs) - Publisher: the Marketplace publisher
liminaliaand the Open VSX namespaceliminaliawere created on 2026-11-22 (verification of the Open VSX namespace’s ownership is requested in https://github.com/EclipseFdn/open-vsx.org/issues/16104)
.github/workflows/publish-vscode.yml does the publishing. When you check and publish the draft Release that release.yml made, it publishes that Release’s
liminalia-<version>.vsix (as with npm, the same version can’t be published twice, so nothing is published while it’s a draft). It skips a store without a token and versions that already exist,
and doesn’t publish versions with a - (pre-releases). If it fails partway, run it manually with the version to publish the rest.
Current state (2026-11-22):
- Open VSX (Cursor, VSCodium and others): the
OVSX_PATsecret is set (a token limited to theliminalianamespace, Publishing only). Publishing the Release publishes it. To replace the token, create one under Access Tokens in the settings at https://open-vsx.org and set it again withgh secret set OVSX_PAT - VS Code Marketplace: there’s no
VSCE_PAT. The Azure DevOps organization that issues Marketplace tokens can’t be created without an Azure subscription (a billing setup). For each version, upload the Release’sliminalia-<version>.vsixby hand from “New extension” → “Visual Studio Code” at https://marketplace.visualstudio.com/manage/publishers/liminalia (it’s published after a few minutes of verification). With Azure set up andVSCE_PATadded, publishing the Release would publish it - To publish a version that’s already released, run “VS Code の拡張機能を公開する” manually with the version
To publish by hand, run npx @vscode/vsce@4.1.1 publish --packagePath packages/vscode/liminalia-<version>.vsix -p <token> and
npx ovsx@1.4.0 publish packages/vscode/liminalia-<version>.vsix -p <token>.