How vsndrg/nvim works
This repository is primarily a Neovim configuration, with a substantial embedded Markdown preview and a separate preview-agent automation tool. The main user workflow is editing in Neovim with configured language and editor features; the preview subsystem turns Markdown into an interactive rendered page, while the agent subsystem orchestrates implementation steps with policy hooks. The graph preserves the documented-by-code preview and agent components, but the empty README and unsampled Neovim/plugin sources limit evidence for their wiring and capabilities.
Main entry points: main.js Preview Interface · policy.py Shared Policy · find.js In-Page Search · viewport.js Viewport Control
Components 18
Neovim Configuration
- Neovim Setup
init.lua - Editor Options
lua/options.lua - Keybindings
lua/keymaps.lua - Language Support
lua/lang - Plugin Features
lua/plugins - Preview Plugin
lua/plugins/mdpreview.lua
Markdown Preview
- Preview Interface
mdpreview/web/src/main.js - Markdown Renderer
mdpreview/web/src/render.js - Diagram Rendering
mdpreview/web/src/mermaid.js - Line Sync
mdpreview/web/src/scroll-sync.js - In-Page Search
mdpreview/web/src/find.js - Scroll Motion
mdpreview/web/src/scroller.js - Viewport Control
mdpreview/web/src/viewport.js
Preview Agent
- Step Orchestrator
preview/agent/run.py - Action Guard
preview/agent/hooks/guard.py - Shared Policy
preview/agent/hooks/policy.py - Change Restore
preview/agent/hooks/restore.py
Other components
- Editor User
Connections 10
- Editor User → Neovim Setup: edits in
- Preview Interface → Markdown Renderer: renders with
mdpreview/web/src/main.js - Preview Interface → Diagram Rendering: renders diagrams
mdpreview/web/src/main.js - Preview Interface → Line Sync: invalidates cache
mdpreview/web/src/main.js - Preview Interface → In-Page Search: searches with
mdpreview/web/src/main.js - In-Page Search → Viewport Control: moves viewport
mdpreview/web/src/find.js - Scroll Motion → Viewport Control: plays motions
mdpreview/web/src/scroller.js - Action Guard → Shared Policy: uses policy
preview/agent/hooks/guard.py - Change Restore → Shared Policy: uses policy
preview/agent/hooks/restore.py - Step Orchestrator → Shared Policy: uses policy
preview/agent/run.py