Real-time markdown preview for Neovim.
- Single binary — no runtime dependencies
- Real-time preview with scroll sync
- Syntax highlighting (light/dark auto-switch)
- Math rendering (KaTeX)
- Mermaid diagram rendering
- Task lists (
- [x]/- [ ]) - Strikethrough (
~~text~~) - Local image preview (relative paths supported)
- GitHub-flavored styling (light/dark auto-switch)
{
"bun913/live-markdown.nvim",
cmd = { "MarkdownPreview", "MarkdownPreviewStop" },
build = "scripts/install.sh",
config = function()
require("live-markdown").setup()
end,
}With a custom browser strategy:
{
"bun913/live-markdown.nvim",
cmd = { "MarkdownPreview", "MarkdownPreviewStop" },
build = "scripts/install.sh",
config = function()
require("live-markdown").setup({
browser = {
strategy = "cmux browser open-split",
},
})
end,
}Pre-built binaries are downloaded from GitHub Releases. No runtime dependencies required.
:MarkdownPreview " Open preview in browser
:MarkdownPreviewStop " Close previewrequire("live-markdown").setup({
server = {
port = 0, -- 0 = OS auto-assigns
host = "localhost",
binary = nil, -- path to compiled binary (nil = auto-detect bin/live-markdown)
},
browser = {
strategy = "auto", -- "auto" | "open" | "xdg-open" | custom command
},
render = {
css = "github-markdown",
mermaid = true,
},
scroll_sync = true,
})| Strategy | Description |
|---|---|
"auto" |
Auto-detect: macOS open, Linux xdg-open |
"open" |
macOS default browser |
"xdg-open" |
Linux default browser |
| Custom string | Executed as shell command with URL appended |
Example with a custom command:
require("live-markdown").setup({
browser = {
strategy = "cmux browser open-split",
},
})MIT
