iamcco / markdown-preview.nvim

markdown preview plugin for (neo)vim
MIT License
6.82k stars 284 forks source link

Can't get the plugin to run after installing with Packer #502

Open harmolipi opened 2 years ago

harmolipi commented 2 years ago

I feel like I must be missing something simple, but for the life of me I still can't get it worked out.

I've installed it by adding this to my plugins.lua file:

  use({ "iamcco/markdown-preview.nvim", run = "cd app && npm install",
    setup = function() vim.g.mkdp_filetypes = { "markdown" } end, ft = { "markdown" }, })

But then I open a markdown file and run :MarkdownPreview but the command isn't found. Even before doing any other configuration, should that at least work? Is there a way to check whether it's been installed correctly?

linuxmobile commented 2 years ago

I'm trying this two:

-- install without yarn or npm

use({
    "iamcco/markdown-preview.nvim",
    run = function() vim.fn["mkdp#util#install"]() end,
})
use({ "iamcco/markdown-preview.nvim", run = "cd app && npm install", setup = function() vim.g.mkdp_filetypes = { "markdown" } end, ft = { "markdown" }, })

And any is working :(. How to solve?

linuxmobile commented 2 years ago

use({ "iamcco/markdown-preview.nvim", run = function() vim.fn["mkdp#util#install"]() end, })

I found the best way to solve this is going to markdown-preview/app folder and do npm i