VS Code extension
Live diagnostics, syntax highlighting, hover, completion, and a build command for .knip files.
Install
Section titled “Install”code --install-extension Katnip-org.katnip-vscodeThen Developer: Reload Window, and open any .knip file.
From source
Section titled “From source”npm run package -w katnip-vscodecode --install-extension packages/vscode/katnip-vscode-0.1.31.vsix --forceThe package script rebuilds the compiler, vendors it into the extension, and produces the .vsix.
What you get
Section titled “What you get”Diagnostics as you type. Errors underline in the editor and list in the Problems panel, with the same messages and spans the CLI prints. That includes a costume or sound whose file is missing — the path is underlined.
Syntax highlighting. A TextMate grammar for .knip.
Hover. Hover a call to see its signature, or a value to see its type.
Completion. After a ., completion lists real members: a namespace’s procedures and enums, an enum’s members, a value’s methods and a struct’s fields, including stdlib and imported ones. It works while the line is still half-written. Anywhere else you get keywords, plus the procedures, enums, structs, sprites and variables declared in the current file.
Language configuration. Bracket matching, auto-closing pairs, and comment toggling.
A build command. Ctrl+Shift+P → Katnip: Build .sb3 compiles the active file.
Settings
Section titled “Settings”| Setting | Default | Meaning |
|---|---|---|
katnip.check.trigger |
onType |
When to re-check — onType or onSave |
katnip.check.debounce |
250 |
Milliseconds after the last keystroke before re-checking (onType only) |
Raise the debounce on a large file if typing feels sticky; switch to onSave if you would rather not see errors while a line is half-written.
Imports resolve against open documents
Section titled “Imports resolve against open documents”The extension supplies its own import resolver, which prefers open editor documents and falls back to the filesystem. Unsaved edits in one file are visible to a file that imports it — you do not have to save to see the effect.
What it is not
Section titled “What it is not”There is no language server. The extension runs a bundled copy of the compiler directly, which means:
- no go-to-definition
- no rename
- no formatter
An LSP is on the roadmap.