A VS Code companion extension for lq — a standalone CLI to parse, query, and mutate LyX documents.
LyX Preview is registered as a VS Code editor and renders a read-only preview of saved .lyx files, combining visual feedback, outline navigation, and AI-assisted workflows.
Features
LyX-Familiar Appearance: Renders layouts, sections, formatting, tables, images, and math with styling faithful to the LyX editor.
LyX Outline View: Dedicated panel in the Explorer sidebar to navigate the Table of Contents, figures, tables, equations, tracked changes, footnotes, and labels/references across both the raw .lyx buffer and the preview.
Tracked-Change Views:Original (before tracked edits), Tracked (edits with markup), and Clean (tracked edits applied). These views change the display only.
Agent Context Sharing: Selecting text or constructs in the preview generates a temporary lqsel.json file next to the previewed .lyx file. To share context, attach it explicitly in a conversation with AI agents.
Status Bar Inspection: Displays the active lq selector, and tracked-change author/timestamp metadata in the VS Code status bar.
Built-in Webview Search: Full support for standard search (Ctrl+F / Cmd+F) inside the preview panel.
Getting Started
Install this extension.
Set lq's installation path in lyx-preview.unmanagedLqPath (used first) or lyx-preview.lqPath (used second). LyX Preview downloads or updates the latter path from the latest GitHub Release. Both settings accept ~.
Add lqsel.json to .gitignore.
Run npx skills add naivej/lq to install the use-lq skill for AI agent workflows.