Skip to content

Instantly share code, notes, and snippets.

@tahir-hassan
Created February 22, 2024 22:23
Show Gist options
  • Save tahir-hassan/32ff102e1bdbfd58db43e5d7b45fda0a to your computer and use it in GitHub Desktop.
Save tahir-hassan/32ff102e1bdbfd58db43e5d7b45fda0a to your computer and use it in GitHub Desktop.
Installing Markdown Preview on LunarVim on Windows

To install Markdown Preview in LunarVim on Windows, follow these steps:

In config.lua add the following to your lvim.plugins table:

{
    "iamcco/markdown-preview.nvim",
    cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
    ft = { "markdown" }
}

Then re-open LunarVim so that it installs Markdown Preview. Close LunarVim.

Using Git Bash, cd to Markdown Preview's plugin folder:

cd $APPDATA/lunarvim/site/pack/lazy/opt/markdown-preview.nvim

Then run:

npx --yes yarn install
npx --yes yarn build

Other useful options to add to your config.lua:

vim.g.mkdp_auto_close = 0 -- do not close browser if you switch buffer
vim.g.mkdp_theme = "dark" -- dark theme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment