VS Code
This guide shows you how to get syntax highlighting, snippets, and API types for Cow files in your editor.
The npm package includes an optional local extension at
node_modules/@cowlang/cow/editor/vscode/. It provides highlighting, snippets, and basic page API suggestions for Cow files. Follow its included README for local setup.Note: Installing Cow does not install the extension in VS Code.
Types for Cow APIs
<?ts
import type { CowRequest } from 'cow:runtime'
export function nameFrom(req: CowRequest): string {
return req.get('name') || 'friend'
}Declarations are included for the runtime, web, SQLite, resource, and CSV APIs. A type import describes a value. It does not create page globals in a helper.
What the tools check
Cow’s editor support is not a full template language server. Standalone TypeScript does not parse tagged Cow files.
cow check checks syntax, not types or import resolution.