gram/packages/vscode-extension
Repository files (latest commit first)
Filename Latest commit message Latest commit date
abiwab a19a2f054b
Some checks failed
CI / Build & Test (pull_request) Has been cancelled
chore: release v1.6.1
2026-12-02 14:38:23 +01:00
..
media feat(renderer): modernize HTML recipe view layout and intermediate traceability (#126) 2026-11-11 16:02:27 +01:00
snippets chore: exorcise the last remaining °{} and ~&{} haunting the repo 👻 2026-07-13 19:35:17 +02:00
src refactor(language-server): derive server capabilities from one client profile 2026-11-22 21:44:40 +01:00
tests feat(vscode): add portions field to the scale and stock section 2026-11-12 16:28:16 +01:00
.gitignore feat(renderer): modernize HTML recipe view layout and intermediate traceability (#126) 2026-11-11 16:02:27 +01:00
.vscodeignore chore: prepare npm and VS Code Marketplace publishing, rename scope to @gram-lang, make CLI Node-compatible 2026-07-06 11:42:24 +02:00
build.cjs feat(renderer): modernize HTML recipe view layout and intermediate traceability (#126) 2026-11-11 16:02:27 +01:00
CHANGELOG.md chore: release v1.6.1 2026-12-02 14:38:23 +01:00
language-configuration.json refactor: Moved source code to new packages folder 2026-01-02 20:16:03 +01:00
LICENSE feat: automate VS Code extension packaging via build script 2026-06-30 21:55:06 +02:00
package.json chore: release v1.6.1 2026-12-02 14:38:23 +01:00
README.md docs(vscode): add demo GIFs to extension README and docs 2026-12-01 12:04:33 +01:00
tsconfig.json chore: bump all dependencies and migrate to typescript 7 dual setup 2026-07-13 13:17:12 +02:00

Gram - Recipe Language

VS Code Marketplace Open VSX License: GPL v3

Part of the Gram monorepo · Documentation · Playground

Editor support for the Gram recipe DSL in VS Code and Open VSX editors (VSCodium, Cursor, Windsurf, Positron). Bundles @gram-lang/language-server with real-time diagnostics, autocomplete, canonical formatting, and side-by-side Live Preview and Run Sheet views. Nothing else to install.

Gram Live Preview side by side with a .gram recipe, recalculating quantities and nutrition live

Features

  • Live Preview (Gram: Live Preview): side-by-side rendered recipe with ingredients, calculated quantities, baker's percentages, and nutrition (Gram: Macros jumps to the table). Scale and stock controls at the top let you change portions, scale factor, a target ingredient weight, the baker's reference, or already-made @use imports for the current sitting without editing the file.
  • Run Sheet (Gram: Run Sheet): day-by-day kitchen plan showing each visit to the kitchen, what to take out, and background rests. Set a Served at time (using timezone and availability from .gram/config.yaml) or use When to serve? to find serving times that fit your schedule.
  • Views and inspectors (Gram: Show View...): open any view (recipe, run sheet) or technical inspector (composed AST, compiled JSON as text or an interactive tree). Open panels follow the active .gram editor, update live, and keep their last valid rendering under a banner while the recipe has errors.
  • Diagnostics and refactoring: real-time syntax and semantic checks (missing references, unused declarations, circular @use imports), symbol rename (F2 across references, percentages, and unit ratios), go to definition, find references, document outline, and folding.
  • Autocomplete and hover: suggestions for ingredients from your local YAML database, units, cookware, intermediate references, and @use paths; hover info for nutrition, scaled quantities, duration breakdowns, and unit ratios.
  • Formatting, quick fixes and hints: canonical formatting (Format Document / Format on Save via @gram-lang/format), quick fixes, volume-to-mass conversions, total-time inlay hints, and CodeLens actions.
  • Offline and deterministic: the bundled language server runs locally with no network calls and no AI.

Run sheet and serving times

Gram Run Sheet view recalculating kitchen visits and rests when choosing a serving time

Autocomplete, hover and diagnostics

Gram language server providing autocomplete, hover tooltips, diagnostics, and inlay hints in VS Code

Installation

  • VS Code: install Gram - Recipe Language from the Extensions view (Ctrl+Shift+X / Cmd+Shift+X) or the VS Code Marketplace.
  • VSCodium, Cursor, Windsurf, Positron: install from Open VSX.

Settings

The gram.* settings control what the preview and run sheet display, using the same values and defaults as the CLI and the Playground:

  • Display and scheduling: gram.miseEnPlace, gram.rests, gram.comments, gram.stepQuantities, gram.nutritionBasis, gram.bakersMathOnly, gram.timeFormat.
  • Analysis and database: gram.ingredientDatabase.path, gram.bakersMath, gram.massStandardization, gram.yieldCalculation, gram.nutritionEstimation.

Changes apply immediately to every open recipe. Project-level timezone, availability, and database settings are read from .gram/config.yaml. See the VS Code extension documentation for full details.

Building from source

  1. Clone the Gram monorepo and move to the repository root.
  2. Install dependencies and build all packages with Bun:
    bun install
    bun run build
    
  3. Package the extension with vsce (npm install -g @vscode/vsce if needed):
    cd packages/vscode-extension
    vsce package
    
  4. In VS Code, open the Extensions view (Ctrl+Shift+X / Cmd+Shift+X), click ... at the top right, select Install from VSIX..., and pick the generated .vsix file.

Issues and license

Bug reports and feature requests are tracked on Forgejo.

Licensed under the GPL-3.0 license.