Monaco
@mudomi/onykia-monaco
provides Monaco editor bindings for the engine.
Work in progress The Monaco binding currently supports only edit forwarding and diagnostics. The richer IDE features (syntax highlighting, autocomplete, hover, go-to-definition) that the CodeMirror package ships have not been ported yet
monaco-editor is a peer dependency.
Usage
primeFile seeds the engine's VFS with the initial document, then bindTypst
attaches the live listeners that keep the engine in sync and surface
diagnostics.
Options
Both default to enabled. The returned object's dispose() detaches every
listener it installed.
Lower-level entry points
If you don't want the bindTypst wrapper, the individual pieces are exported:
forwardEdits(core, model, path)- returns a disposable that mirrors model edits intocore.edit().diagnosticsSubscription(core, model, path)- subscribes toonDiagnosticsand applies markers; returns an unsubscribe function.applyDiagnostics(...)- apply one diagnostics batch yourself.primeFile(core, model, path, mime?)- create the VFS file from the model's current value before binding (mimedefaults totext/x-typst).