Back to articles

Markdown Rendering in Neovim

Computer TechDevelopmentEditorsNeovimMarkdown Rendering in Neovim
Updated 4/23/2026

Markdown Rendering in Neovim

Neovim can render markdown with formatted tables, headings, and styling - similar to Obsidian's reading mode.

Current Setup: markdown-preview.nvim

What you have installed:

  • Plugin: iamcco/markdown-preview.nvim
  • Opens rendered markdown in web browser
  • Full HTML rendering with live reload

How to use:

vim
:MarkdownPreview

Or use the keybind (in markdown files):

  • Press <leader>cp to toggle preview

Pros:

  • Full-featured HTML rendering
  • Live updates as you type
  • Supports complex markdown features
  • Renders exactly like published content

Cons:

  • Opens in separate browser window (not in-editor)
  • Requires switching between editor and browser
  • Not ideal for quick table viewing

Better Option: render-markdown.nvim

For Obsidian-like in-editor rendering:

Install MeanderingProgrammer/render-markdown.nvim - renders markdown directly in Neovim buffer:

Features:

  • Tables render as formatted tables (like Obsidian)
  • Headings display with proper sizing/styling
  • Code blocks with syntax highlighting
  • Checkboxes render as actual checkboxes
  • Conceals markdown syntax characters
  • No external browser needed

Installation (LazyVim):

Create ~/.config/nvim/lua/plugins/render-markdown.lua:

lua
return {
  {
    "MeanderingProgrammer/render-markdown.nvim",
    opts = {},
    dependencies = {
      "nvim-treesitter/nvim-treesitter",
      "nvim-tree/nvim-web-devicons",
    },
    ft = { "markdown" },
  },
}

Then restart Neovim or run :Lazy sync

Usage:

  • Auto-renders when opening .md files
  • Toggle rendering: :RenderMarkdown toggle
  • Enable: :RenderMarkdown enable
  • Disable: :RenderMarkdown disable

Comparison

Featuremarkdown-preview.nvimrender-markdown.nvim
Rendering locationBrowserIn-editor buffer
Table renderingHTMLUnicode box drawing
Live previewYesYes
Switch windowsRequiredNot needed
Complex markdownFull HTML supportBasic formatting
Obsidian-likeNoYes

Use both plugins for different purposes:

  1. Daily editing with render-markdown.nvim:

    • Quick table viewing
    • Formatted headings
    • In-editor rendering
    • No context switching
  2. Final preview with markdown-preview.nvim:

    • Check published appearance
    • Verify complex markdown
    • Share preview with others

Example: Table Rendering

Source markdown:

markdown
| Key | Function | Details |
|-----|----------|---------|
| `z` | Zoxide jump | Opens picker |
| `Z` | fzf search | Recursive search |

With render-markdown.nvim (in Neovim buffer):

╭─────┬──────────────┬─────────────────╮
│ Key │ Function     │ Details         │
├─────┼──────────────┼─────────────────┤
│ z   │ Zoxide jump  │ Opens picker    │
│ Z   │ fzf search   │ Recursive search│
╰─────┴──────────────┴─────────────────╯

With markdown-preview.nvim (in browser):

  • Full HTML table with CSS styling

Spell Check in Neovim

Hide spelling errors:

  1. Disable spell check entirely:
vim
:set nospell
  1. Or make it less intrusive in ~/.config/nvim/lua/config/options.lua:
lua
vim.opt.spell = false  -- Disable by default
  1. Toggle spell check with keybind:
lua
vim.keymap.set("n", "<leader>us", function()
  vim.opt.spell = not vim.opt.spell:get()
end, { desc = "Toggle Spelling" })

Quick Setup Script

Add render-markdown.nvim to your LazyVim:

bash
cat > ~/.config/nvim/lua/plugins/render-markdown.lua << 'EOF'
return {
  {
    "MeanderingProgrammer/render-markdown.nvim",
    opts = {
      heading = {
        enabled = true,
        icons = { "󰲡 ", "󰲣 ", "󰲥 ", "󰲧 ", "󰲩 ", "󰲫 " },
      },
      code = {
        enabled = true,
        style = "full",
      },
      bullet = {
        enabled = true,
      },
    },
    dependencies = {
      "nvim-treesitter/nvim-treesitter",
      "nvim-tree/nvim-web-devicons",
    },
    ft = { "markdown" },
  },
}
EOF

Then restart Neovim.

render-markdown.nvim GitHub

markdown-preview.nvim GitHub