A Markdown renderer for Neovim that runs entirely in the terminal. It shows a Markdown buffer — images, video, and diagrams included — in a floating window, a tab, a split beside the source, in place of the source, or as a less-like pager, and leaves the buffer you edit untouched.
- Markdown, fully rendered — inline formatting, tables, GitHub / Obsidian callouts,
<details>, and code blocks highlighted by treesitter. Callouts,<details>, and truncated code blocks and tables fold and expand with<CR>or a click - Images and video — PNG, JPEG, WebP, GIF, and MP4 / WebM / MOV, local or from the web, drawn inline with the Kitty graphics protocol
- Diagrams — Mermaid and PlantUML fences rendered as images
- Zoom —
<CR>or a click on an image, a video, or a diagram enlarges it to fill the editor. A Mermaid diagram is drawn again at that size, so its text stays sharp - Links — click to open, hover to see the full URL, OSC 8 hyperlinks
- Japanese and other CJK text — JIS X 4051 line breaking, optional BudouX phrase breaking, and no stray spaces between joined lines
- Scaled headings (experimental, Kitty only) — headings drawn larger with the text sizing protocol
- Picker previews — for telescope.nvim and snacks.nvim
- Library API — use the rendering engine from your own plugin
md-render-zoom.mp4
- Neovim 0.12 or later
- For images and video: a terminal that supports the Kitty graphics protocol, such as WezTerm, Kitty, or Ghostty
- Optional:
ffmpeg(video, animated GIF),mmdc(Mermaid),plantuml(PlantUML),curl(web images), budoux.lua (CJK phrase breaking), nvim-web-devicons or mini.icons (icons). See:help md-render-dependencies
With lazy.nvim:
{
"delphinus/md-render.nvim",
version = "*",
dependencies = {
{ "nvim-tree/nvim-web-devicons", version = "*" }, -- optional
{ "delphinus/budoux.lua", version = "*" }, -- optional
},
keys = {
{ "<leader>mp", "<Plug>(md-render-preview)", desc = "Markdown preview (toggle)" },
{ "<leader>mt", "<Plug>(md-render-preview-tab)", desc = "Markdown preview in tab (toggle)" },
},
}The plugin sets no key mappings of its own. For vim.pack and mini.deps, see :help md-render-installation.
To see every feature, open the showcase bundled with the plugin in the pager, or run :MdRender demo:
git clone https://github.com/delphinus/md-render.nvim
nvim +"MdRender pager" md-render.nvim/assets/showcase.md| Command | Shows the current Markdown buffer |
|---|---|
:MdRender |
in a floating window |
:MdRender tab |
in a new tab |
:MdRender split |
in a split beside the source; edits and the cursor follow live |
:MdRender toggle |
in place of the source, in the same window |
:MdRender pager |
full screen; q quits Neovim |
In a preview:
| Key | Action |
|---|---|
<CR> |
Enlarge the image, or fold / expand the block, under the cursor |
| click | Enlarge an image, fold / expand a block, or open a link |
za |
Fold / expand the block under the cursor |
q / <Esc> |
Close the floating window or tab |
Everything else is in the help: all commands and options, rendering width, the experimental features, picker integration, the Lua API, highlight groups, and troubleshooting.
:help md-render.txt(doc/md-render.txt)- Japanese:
:help md-render.jax(doc/md-render.jax)
make test runs the tests. See tests/README.md for the other test layers.
MIT — see LICENSE.
lua/md-render/vendor/ is third-party code kept verbatim under its own license:
a copy of Neovim's vim.async (Apache-2.0), which gives Neovim 0.12 the async
runtime 0.13 has built in. See its README.