Highly opinionated live Markdown preview for Neovim, powered by a Go remote host and a local WebSocket preview server.
go-live-markdown.nvim focuses on a tight markdown editing loop:
- Start preview once with
:GoLiveMarkdownStart - Type in Neovim and see rendered output update immediately
- Move cursor in Neovim and let browser auto-follow the active source line
- Double-click in browser to jump Neovim cursor back to that markdown line
- Copy code block contents directly from preview
No Node runtime or external web app is required.
- Neovim with remote plugin support (the plugin uses a Go host)
- A browser
- Go toolchain only if you need to build the host binary
{
"pompos02/go-live-markdown.nvim",
ft = "markdown",
}This repo includes a Linux host binary at bin/go-live-markdown-nvim.
On macOS (and other non-Linux systems), build from source on install:
{
"pompos02/go-live-markdown.nvim",
ft = "markdown",
build = "./build",
}At startup, the plugin resolves the host executable in this order:
vim.g.go_live_markdown_host_prog- Local plugin binary:
./bin/go-live-markdown-nvim go-live-markdown-nvimfrom$PATH
If the host is not found, you'll see an error in Neovim and preview will not start.
vim.g.go_live_markdown_host_prog = "/absolute/path/to/go-live-markdown-nvim"-
Open any
*.mdbuffer. -
Run:
:GoLiveMarkdownStart
-
Neovim echoes the preview URL (served locally on
http://127.0.0.1:7777). -
Just use Nvim and the preview will follow you around
- Double click a rendered block to jump Neovim to that source line.
- Single click heading text to navigate by heading anchors.
- Click the heading anchor on
h1-h3to collapse or expand that section. - Click code-language badge (top-right of fenced blocks) to copy code to clipboard.
The renderer uses Goldmark with extensions and custom AST decoration.
Included support:
- GFM (tables, strikethrough, task lists, autolinks)
- Footnotes
- MathJax math rendering (inline and block)
- Wiki links
- Alert/callout blocks
- Syntax highlighting (Chroma classes)
- Heading anchors
- Source-line metadata on rendered block elements for sync
Local image paths are served by the local preview server.
- Relative paths resolve from the markdown file's directory
- Absolute local paths are supported
- Remote URLs should work
Build script:
./buildThis compiles:
- from:
./cmd/go-live-markdown-nvim - to:
./bin/go-live-markdown-nvim
Requirements:
goavailable in$PATH
Use markdown-test.md to validate common behavior quickly:
- Open
markdown-test.mdin Neovim - Run
:GoLiveMarkdownStart - Edit text and move cursor to verify live rendering + follow
- Double click in preview to verify browser -> Neovim jump
- Try fenced code copy badge and local image paths
- Single preview server instance (fixed address
127.0.0.1:7777) - Single active browser connection is handled reliably (the connection will jump between the tabs)
Note
- The frontend logic was written with Codex



