Skip to content

Latest commit

Β 

History

History
50 lines (35 loc) Β· 1.59 KB

File metadata and controls

50 lines (35 loc) Β· 1.59 KB

πŸ“„ markdown-preview.nvim

A minimal Neovim plugin to preview Markdown files in a terminal split using glow. Designed for speed, simplicity, and seamless Lazy.nvim integration. The goals is for me to quickly view the documentation instead of used as a markdown previewer as one would use as if the vscode in-built markdown.


✨ Features

  • πŸ–₯️ Previews the current buffer using glow in a horizontal terminal split
  • 🧠 Smart use of tempfiles β€” no file saving needed
  • πŸ” Lazy-loaded only when needed (:MarkdownPreview)

πŸš€ Requirements


Installation

Install using the nvim as

{
    "Isaac7777-cpu/markdown-preview.nvim",
    name = "markdown-preview.nvim", -- Optional name used internally
    cond = function()
        if vim.fn.executable("glow") ~= 1 then
            vim.notify("[markdown-preview.nvim] Skipped: glow not found in PATH", vim.log.levels.WARN)
            return false
        end
        return true
    end,
    config = function()
        require("markdown_preview") -- loads lua/markdown_preview/init.lua

        vim.keymap.set("n", "kK", "<cmd>DocumentationPreview<CR>",
            { desc = "Full Documentation Preview with Glow to see a nice layout of documentation." })
    end
}

Acknowledge

This repository has taken inspiration from this great repository which has unfortunately been archived by the owner recently.