Beta stage — active development. This repository is past its first shape and in active use, but the surface is not frozen: breaking changes are still possible. Pin a commit or tag if you depend on it.
__ __
____ ___ ____ ______/ /______/ /___ _ ______
/ __ `__ \/ __ `/ ___/ //_/ __ / __ \ | /| / / __ \
/ / / / / / /_/ / / / ,< / /_/ / /_/ / |/ |/ / / / /
/_/ /_/ /_/\__,_/_/ /_/|_|\__,_/\____/|__/|__/_/ /_/
a self-contained markdown toolkit
Part of the wkd family — see this plugin's page on the site.
A self-contained Markdown toolkit for Neovim, behind one :Markdown command.
Headings and folding, GFM tables, links and references, and a cursor-action
dispatcher that opens whatever is under the cursor — all of it FileType-scoped,
with no side effects on any buffer that is not Markdown.
cascade.nvim — the list content inside the document: continue, renumber, rotate. markdown.nvim structures the document, cascade edits what is in it.
hover.nvim — the host for the link preview. markdown.nvim contributes its link scanner and
#headingpreviews; without it those simply do not exist.mdview.nvim — renders the document outside the editor, for the moment you want to see it as a reader would.
pdfport.nvim — the PDF half: exports the buffer, and renders a
images.nvim — pasting and screenshotting images into the document, and drawing them in the preview.
All of the above are soft: without them everything else works unchanged. lib.nvim is the one real dependency — see Requirements.
Start at docs/README.md, which says what is where and which question each page answers.
- Requirements — Neovim version, required plugins and CLI tools.
- Installation — a spec per plugin manager.
- Quickstart — the first thing to run after installing.
- What you get with the defaults — the full command surface at a glance.
- All options — every
setup()option and its default, opening with the ready-to-paste snippets. - Config templates — copy-paste
setup()snippets: blockquote colors, feature subsets, picker backends, image preview. - Command reference —
:Markdown, subcommand by subcommand. - Keymaps / Bindings cheatsheet
- Features — one page per area: headings, tables, links and references, editing and handlers, highlighting and UI, integrations.
- Link hover preview — the float that previews what a link or a bare path points at, and everything it can show.
- Image captions — implicit figures vs. an HTML
<figure>vs.@fig:cross-references, and what each costs in the editor. - Fenced-block scope — why a Markdown document inside another one needs its own scope.
- Tables — besides GFM: org, box-drawing, CSV and TSV tables (
table.formats,:Markdown table convert), a picker over every table of a scope (:Markdown table list), and the native in-buffer renderer (:Markdown render). - Width-limited table wrapping —
:Markdown table format max=40, the:MDTable*family, display-only truncation with a full-text popup (:Markdown table truncate), and a virtual grid that fits the window and re-lays out on resize (:Markdown table render). - Menu integration — the context-aware entries shipped for nvzone/menu.
- Architecture — source tree layout and module responsibilities.
- Workflow — how the features combine while actually writing a document, rather than what each one does.
- Health check — what
:checkhealth markdownreports. - Contributing — ground rules, project layout, and how to add a handler or a command.
- Feedback — bugs, feature requests and usage questions; broader discussion in Discussions.
:help markdown.nvim is the same reference inside the editor.
markdown.nvim is released under the MIT License.
Uses
- color_my_ascii.nvim: markdown.nvim lets color_my_ascii.nvim color the fenced code blocks (
fenced_scope.provider = "auto") and falls back to its own coloring without it. (picture) - hover.nvim: The hover of markdown.nvim classifies a link target and builds its preview with hover.nvim (
hover.classify,hover.preview.text). (picture) - images.nvim: The image command of markdown.nvim hands the picture to images.nvim when it is installed. (picture)
- mdview.nvim: markdown.nvim offers
:Markdown previewand:Markdown mdviewwhen mdview.nvim is installed. (picture) - pdfport.nvim: markdown.nvim opens a PDF that a link points at in a new buffer through pdfport.nvim (
pdfport.open). (picture) - pickers.nvim: The table list of markdown.nvim picks through pickers.nvim (
pickers.preview_modes) unlesspicker = "builtin"is set. (picture) - ui.nvim: markdown.nvim confirms the deletion of a link with
ui.kit.confirmof ui.nvim when it is installed. (picture) - lib.nvim: the shared base of the plugins.
Used by
- buffer-ctx.nvim: With markdown.nvim installed,
:Insert mdlinkand:Copy mdlinkof buffer-ctx.nvim use its link builder (markdown.commands.markdown_links). (picture) - cascade.nvim: In markdown buffers, cascade.nvim consults the table mode of markdown.nvim (
markdown.core.table_mode) before it acts. (picture) - filetree.nvim: When filetree.nvim renames, moves or deletes a file, it asks markdown.nvim for the markdown links that point at it and rewrites them, when it is installed. (picture)
- images.nvim: images.nvim resolves paths with the resolver of markdown.nvim (
markdown.util.path) when it is installed, and with its own otherwise. (picture)
