Skip to content

About

Self-contained Markdown toolkit for Neovim — heading nav/shift, TOC, folding, GFM tables, link/anchor/image handling, and highlight fixes. FileType-scoped, no external tools.

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

markdown-nvim

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.

markdown.nvim

                         __       __
   ____ ___  ____ ______/ /______/ /___ _      ______
  / __ `__ \/ __ `/ ___/ //_/ __  / __ \ | /| / / __ \
 / / / / / / /_/ / /  / ,< / /_/ / /_/ / |/ |/ / / / /
/_/ /_/ /_/\__,_/_/  /_/|_|\__,_/\____/|__/|__/_/ /_/
            a self-contained markdown toolkit

License: MIT Neovim Lua Status Platform CI wkd

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.


Around it

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 #heading previews; 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 .pdf link target into a Neovim buffer instead of handing it to the system reader.

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.


Documentation

Start at docs/README.md, which says what is where and which question each page answers.

The Basics

Configuration

The Rest

  • 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 markdown reports.
  • 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.


License

License: MIT

markdown.nvim is released under the MIT License.

Connections

markdown.nvim: what it uses and what uses it

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 preview and :Markdown mdview when 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) unless picker = "builtin" is set. (picture)
  • ui.nvim: markdown.nvim confirms the deletion of a link with ui.kit.confirm of 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 mdlink and :Copy mdlink of 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)

About

Self-contained Markdown toolkit for Neovim — heading nav/shift, TOC, folding, GFM tables, link/anchor/image handling, and highlight fixes. FileType-scoped, no external tools.

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages