iamcco / markdown-preview.nvim

markdown preview plugin for (neo)vim
MIT License
6.66k stars 276 forks source link

Fresh install via packer not working #506

Open jj0b opened 2 years ago

jj0b commented 2 years ago

Describe the bug

Fresh seemingly successful install with packer, the commands show up but :MarkdownPreview command does nothing.

To Reproduce Steps to reproduce the behavior:

  1. Install with packer as per the instructions by placing the following into your plugins.lua file:
use({
    "iamcco/markdown-preview.nvim",
    run = function() vim.fn["mkdp#util#install"]() end,
})
  1. Run :PackerInstall and note that markdown-preview has successfully installed
  2. Open a .md file
  3. Note that if you start to type the :MarkdownPreview command that you can tab complete it, ie this is showing that markdown-preview is indeed installed
  4. Execute :MarkdownPreview and notice that nothing happens. No errors, and no preview opens in any browser.

Expected behavior

I expect that when I execute :MarkdownPreview that a preview should open in my browser.

Desktop (please complete the following information):

cstsunfu commented 2 years ago

I got the same issue.

yaocccc commented 2 years ago

me too

yaocccc commented 2 years ago

:call mkdp#util#install()

can resolve it, but I don't know why packer not run 'cd app && yarn'

jj0b commented 2 years ago

@yaocccc I just tried :call mkdp#util#install() but it just gave an error message that markdown preview couldn't be installed. The thing is that for me, it is already installed. Neovim will even show me the autocompletion of the commands, but :MarkdownPreview just doesn't seem to do anything.

yaocccc commented 2 years ago

cd to plugin dir, cd app && yarn

jj0b commented 2 years ago

@yaocccc I do have a plugin directory next to my init.lua file and lua directory, but I don't have an app directory in there. Is that supposed to be created by packer or are you talking about something/somewhere else?

yaocccc commented 2 years ago

@yaocccc I do have a plugin directory next to my init.lua file and lua directory, but I don't have an app directory in there. Is that supposed to be created by packer or are you talking about something/somewhere else?

I mean

cd ~/.local/share/nvim/site/pack/packer/start/markdown-preview.nvim
cd app && yarn
jj0b commented 2 years ago

Thanks @yaocccc! That worked. :)

jdhao commented 1 year ago

Same issue, related:

https://github.com/iamcco/markdown-preview.nvim/issues/497 https://github.com/iamcco/markdown-preview.nvim/issues/502

b3z commented 1 year ago

Ye by the way there is no error message if yarn is not available.