markdown-preview.nvim icon indicating copy to clipboard operation
markdown-preview.nvim copied to clipboard

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

Open harmolipi opened this issue 3 years ago • 2 comments

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?

harmolipi avatar Sep 10 '22 14:09 harmolipi

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 avatar Sep 14 '22 06:09 linuxmobile

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

linuxmobile avatar Sep 14 '22 06:09 linuxmobile