Skip to content

Commit

Permalink
docs: add lazy.nvim install description (iamcco#583)
Browse files Browse the repository at this point in the history
* docs: add lazy.nvim install description

* docs: missed comma in lazy.nvim description

* docs: lazy.nvim instruction, add more cmd (preview, previewStop)
  • Loading branch information
nolleh authored Oct 14, 2023
1 parent a648af9 commit 4d77db3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,31 @@ Plugin 'iamcco/markdown-preview.nvim'
:PluginInstall
:call mkdp#util#install()
```
Or with [lazy.nvim](https://github.com/folke/lazy.nvim):

Add this in your `init.lua or plugins.lua`

```lua
-- install without yarn or npm
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
ft = { "markdown" },
build = function() vim.fn["mkdp#util#install"]() end,
}

-- install with yarn or npm
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
build = "cd app && yarn install",
init = function()
vim.g.mkdp_filetypes = { "markdown" }
end,
ft = { "markdown" },
},

```
Or with [Packer.nvim](https://github.com/wbthomason/packer.nvim):

Add this in your `init.lua or plugins.lua`
Expand Down

0 comments on commit 4d77db3

Please sign in to comment.