Skip to content

VS Code extension

Live diagnostics, syntax highlighting, basic completion, and a build command for .knip files.

Terminal window
code --install-extension Katnip-org.katnip-vscode

Then Developer: Reload Window, and open any .knip file.

Terminal window
npm run package -w katnip-vscode
code --install-extension packages/vscode/katnip-vscode-0.1.25.vsix --force

The package script rebuilds the compiler, vendors it into the extension, and produces the .vsix.

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.

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.

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.

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.