VS Code extension
Live diagnostics, syntax highlighting, basic 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.25.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.
Basic completion. Keywords, plus the procedures, enums, structs, sprites and variables declared in the current file. It is a text scan, so it does not know about stdlib members or imported files.
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 type-aware completion
- no hover
- no go-to-definition
- no rename
- no formatter
An LSP is on the roadmap.