infinite.pm — VS Code extensionLanguage support for Infinite Process Modeling (infinite.pm) inside VS Code: ipmt syntax highlighting, hover, diagnostics, semantic colors for event / thing / concept nodes, and embed-on-save that keeps committed SVG diagrams in sync with their source. Published on the Visual Studio Marketplace. See it workPreview a
|
| Setting | Default | Meaning |
|---|---|---|
ipm.serverPath |
"" |
Path to the ipm-rpc binary. (machine-overridable: settable per user or per remote machine, never by a workspace.) If empty, the extension searches PATH for ipm-rpc; if still not found, falls back to the ipm-rpc bundled in the extension's bin/<os>-<arch>/ directory. |
ipm.embedOnSave |
true |
When you save a .md file with ipmt blocks, refresh the committed SVGs and marker hashes via ipm.embed. |
ipm.embedDebounceMs |
0 |
Debounce period before embed-on-save fires. 0 = no debounce; embed runs on every save. Raise to e.g. 800 if you save rapidly during editing. |
ipm.liveRefresh |
true |
Refresh ipmt diagrams in the markdown preview as you type (no save needed). Renders are in-memory via ipm.embedBuffer; the on-disk SVGs are untouched until you save and ipm.embed runs. |
ipm.liveRefreshDebounceMs |
300 |
Idle time (ms) after the last keystroke before live-refresh fires. 0 = re-render on every change (heavier). |
ipm.restartOnBinaryChange |
true |
Watch the resolved ipm-rpc binary path; auto-restart the LSP client when the binary file changes (e.g. after go install ./cmd/ipm-rpc). Disable if your platform's fs.watch gives spurious events. |
Commands
| Command palette entry | What it does |
|---|---|
| infinite.pm: Restart Language Server | Stops the LSP client and starts it again (re-reading the configured ipm-rpc binary). |
| infinite.pm: Show Server Info (path + version) | Shows the resolved binary path, its --version output, and the current LSP connection state via a notification + the output channel. |
| infinite.pm: Open Preview | (.ipmt files only) Replaces the active source pane with a webview rendering the SVG. The source tab is closed; click "Show Source" to bring it back. Icon: a bundled SVG (media/preview-{light,dark}.svg) modelled on markdown's in-place preview icon. |
| infinite.pm: Open Preview to the Side | (.ipmt files only) Same as above but opens beside the source pane — both stay visible. Icon: $(open-preview) (same codicon markdown uses for side preview). |
| infinite.pm: Reopen as source file | (visible only when an ipmt preview is the active panel) Flips back from the preview to the source text document in the same column; the preview tab is closed. Title + icon ($(file-code)) mirror VS Code Insiders' current "back to source" action. |
| infinite.pm: Force Re-embed Current File | (markdown files only) Runs ipm.embed on the active .md file immediately, regardless of the ipm.embedOnSave setting — refreshes its committed SVGs and marker hashes on demand. The file is saved first if dirty (ipm.embed reads from disk); invoked from a focused markdown preview it targets the most recently active markdown file. |
| infinite.pm: Force Re-embed All Markdown Files in Workspace | Runs ipm.embed across every markdown file in the workspace (excluding node_modules), refreshing all committed SVGs and marker hashes. Asks for confirmation first, then runs under a cancellable progress notification. |
| infinite.pm: Force Re-embed All Markdown Files in Current Repo | Like the workspace command — same confirmation and cancellable progress — but scoped to the git repository containing the active editor. |
| infinite.pm: Copy Path | (ipmt preview panel only) Copies the absolute path of the source .ipmt file to the clipboard. Also on the preview's title bar / context menu. |
| infinite.pm: Copy Relative Path | (ipmt preview panel only) Copies the workspace-relative path of the source .ipmt file. Also on the preview's title bar / context menu. |
| infinite.pm: Reveal in Explorer View | (ipmt preview panel only) Reveals the source .ipmt file in the Explorer. Also on the preview's title bar / context menu. |
The editor title bar of a .ipmt file shows two distinct preview icons (in-place + side-by-side); the preview pane shows the "back to source" icon. The icons + behavior mirror VS Code's markdown preview UX so muscle memory carries over.
What gets contributed to VS Code
- A new language:
ipmt(file extension.ipmt). - Two TextMate grammars: one for standalone
.ipmtfiles, one for markdown injection. (These are the cold-start fallback whenipm-rpcisn't running; once the LSP is up, semantic tokens take over.) - 10 custom semantic token types:
ipmEvent,ipmThing,ipmConcept,ipmRelation,ipmArrow,ipmTypeMarker,ipmComment,ipmString,ipmTooltip,ipmUnresolved. - 7 token modifiers:
alias,hasAlias,marker,leadsTo,partOf,expresses,nearTo. - Default color customizations (generated from the ipm-tools palette): event=orange, thing=green, concept=blue, arrows bold, kind markers bold, tooltips yellow italic.
- An LSP client that connects to
ipm-rpc. - A
workspace.onDidSaveTextDocumentlistener that runsipm.embedfor saved markdown files (gated byipm.embedOnSave). - A live-refresh listener (onChange / onOpen / activation-time scan) that calls
ipm.embedBufferto paint in-memory SVG data URLs into the markdown preview before save (gated byipm.liveRefresh). - A markdown-it fence-renderer override that uses LSP-emitted tokens (piggybacked on each
ipm.embedBufferresponse) to paint ipmt code blocks in the markdown preview with the exact same palette as the editor pane.
Development
Building from source requires a checkout of
ipm-tools next to this repo
(../ipm-tools) — the palette codegen reads its source of truth from there
(see below).
npm install
npm run gen-palette # regenerate from ../ipm-tools/pkg/ipmtokens/palette.json
npm run gen-palette:check # CI guard — exits non-zero on drift
npm run build # webpack production bundle (runs gen-palette:check first)
npm run watch # auto-rebuild on changes
npm test # node:test + tsx against the in-tree unit tests (runs gen-palette:check first)
npm run package # produce the .vsix (warns if bin/<goos>-<goarch>/ipm-rpc is absent,
# in which case the vsix relies on PATH / ipm.serverPath)
npm run ci # local equivalent of the CI pipeline
Press F5 from VS Code to launch a development host with the extension loaded.
The token palette's single source of truth lives in the ipm-tools repo at pkg/ipmtokens/palette.json. scripts/gen-palette.ts reads it (from the sibling ../ipm-tools) and generates src/palette.gen.ts, the editor.semanticTokenColorCustomizations.rules in package.json, and the .ipm-* classes in media/ipm-preview.css. The drift check (gen-palette:check) runs before every build and test, so editing a generated file or the palette without regenerating is caught immediately. To change colors, edit palette.json in ipm-tools and run npm run gen-palette.
Related projects
- ipm-tools —
ipm-rpclanguage server,md-embedCLI, ipmt parser, SVG renderer, validator. - ipm-intro — newcomer documentation for the modeling notation.
- infinite.pm — the project.
Authors & credits
Created and maintained by mj41, spec-driven / "vibe-coded"
with help from Claude (Opus) and other AI coding agents. See AUTHORS.md.
License
See LICENSE.

