Kiira for VS Code
Live type-checking for TypeScript & JavaScript code fences inside Markdown.
Kiira extracts the ```ts / ```tsx / ```js / ```jsx code blocks from
your Markdown and type-checks them against your real project — the same
tsconfig, the same workspace packages, the same dependency types. Broken example
code in your docs gets a red squiggle the moment you write it, mapped back to the
exact line inside the fence.
Powered by kiira. For CI and
command-line use, see the kiira CLI.
Requirements
The extension needs TypeScript 5.4 or newer (below 7). It checks each workspace folder with the folder's own TypeScript when one is installed, so diagnostics match your project, and otherwise uses the TypeScript that VS Code ships for its built-in TypeScript features. It does not bundle a copy of TypeScript. When you install or update TypeScript in the workspace, reload the window to use it.
Features
- Live diagnostics in Markdown — type errors in fenced code appear as you type
(debounced) and on save, with messages mapped to the correct line and column.
- TypeScript quick fixes inside fences — the lightbulb (
Ctrl+. / Cmd+.)
offers TypeScript's own fixes: auto-import a missing symbol, fix a misspelled
name, add a missing await, implement an interface, and more — with the edit
applied back into the Markdown.
- Kiira quick fixes — one-click to change a mistagged
```ts fence to
```tsx when it contains JSX, or to tag continuation snippets with group=…
so they type-check together.
- Workspace-aware — resolves your monorepo's packages and their types, so
import { x } from "@your/pkg" checks just like it does in your editor.
- Inspect the generated file — Kiira: Open Virtual File For Snippet shows
the synthesized
.ts/.tsx a fence is checked as, including grouped snippets.
Commands
| Command |
Description |
Kiira: Check Current File |
Re-check the active Markdown document. |
Kiira: Check Workspace |
Check every Markdown file in the workspace. |
Kiira: Open Virtual File For Snippet |
Inspect the generated code for a fence. |
Kiira: Restart Kiira Server |
Clear and re-check all open documents. |
Settings
| Setting |
Default |
Description |
kiira.enable |
true |
Enable Kiira diagnostics in Markdown files. |
kiira.configPath |
kiira.config.ts |
Path to the Kiira config, relative to the workspace root. |
kiira.debounceMs |
300 |
Delay before re-checking after a change. |
kiira.checkOnChange |
true |
Re-check as the document changes (debounced). |
kiira.checkOnSave |
true |
Re-check when the document is saved. |
kiira.showGeneratedDiagnostics |
false |
Show diagnostics from generated fixture code (for debugging). |
How it works
Each code fence becomes an in-memory "virtual file" that is type-checked with your
project's compiler options and module resolution — nothing is written to disk.
Diagnostics are mapped from the virtual file back to the Markdown source. Snippets
that continue an earlier one can be tagged group=<name> to share scope, and
Kiira will suggest grouping when it detects a continuation.
See the project README for
configuration, the CLI, and the GitHub Action.
License
MIT