Skip to content

Add live preview integration for VS Code extension #64

@geoffjay

Description

@geoffjay

Summary

Integrate Nemo's dev watch mode with the VS Code extension so that saving a Nemo XML file automatically reloads the running preview. Also add a "Preview in Nemo" command that launches or focuses the Nemo window for the current config.

Context

The nemo dev --watch mode (from the Build and Installation epic, #10) watches for file changes and hot-reloads the application. The VS Code extension should surface this as a seamless preview experience:

  • Launch the app in dev mode from VS Code
  • Save → auto-reload the preview window
  • Keep the preview window visible alongside the editor

This creates a tight feedback loop: edit XML → Ctrl+S → see changes instantly.

Acceptance Criteria

  • "Preview in Nemo" VS Code command:
    • Saves current file
    • If no preview is running, launches nemo dev --watch --app-config <file> in a terminal
    • If preview is already running, focuses the Nemo window (platform-specific)
  • nemo dev subcommand (from Build epic) must signal ready state so VS Code knows when to show preview
  • Status bar indicator in VS Code showing preview state (running/stopped/error)
  • "Stop Preview" command to terminate the dev server
  • On file save during preview, VS Code sends a notification or the watcher picks up the change
  • Preview terminal reused across saves (not spawning a new process each time)
  • Error handling: if Nemo binary not found, show setup instructions

Relevant Files

  • extensions/nemo-vscode/ — VS Code extension
  • crates/nemo/src/args.rs — CLI (needs dev subcommand from Build epic)
  • crates/nemo/src/main.rs — app entry point

Stack Base

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions