Closed vaklinzi closed 4 years ago
try packadd markdown-preview.nvim
I use the following:
call packager#add('iamcco/markdown-preview.nvim', {'type': 'opt', 'do': 'packadd markdown-preview.nvim | call mkdp#util#install()'})
No need to do packadd in the do
. This should work fine:
call packager#add('iamcco/markdown-preview.nvim', {'type': 'opt', 'do': ':call mkdp#util#install()'})
Note the :
at the beginning of the do
value. This tells packager it's a vim command.
you don't need to do packadd because packager adds it to runtime after install/update.
Did not know, thank you!
Everything ok? Can we close this?
I have the same plugin as the author of the issue and your approach is works for me.
No, it's still doesn't work. If I set packadd markdown-preview.nvim
it will be added for every filetype (and it works) but I don't need that. Why will I use opt if I cannot specify for which type it should be active? For most of the plugins filetype specification works but this is one example where it doesn't work.
I need something like: autocmd FileType markdown packadd vim-markdown | packadd markdown-preview
@vaklinzi, to enable it for specific type I to calling :packadd ...
in ftplugin.
@vaklinzi i meant to do that in the autocmd like you did, just append .nvim
@kristijanhusak I didn't notice the .nvim. Sorry for that. Works properly now.
Thank you for the great package manager. It's fast and simple and I just love it. I just have one problem when trying to install some plugins as an optional type. One such example is
https://github.com/iamcco/markdown-preview.nvim
which I added like this:call packager#add('iamcco/markdown-preview.nvim', {'do': 'sh -c "cd app & yarn install"', 'type': 'opt'})
and then:
but when I open a markdown file, all the commands for this plugin are missing. I had the same problem with few other plugins with optional type (but not will all) so maybe I am missing something.