mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 04:40:06 +08:00
Add npm support for building 2 plugins (#3154)
This commit is contained in:
parent
e3ab2f4f7e
commit
2f38a08f78
@ -25,13 +25,22 @@ function! SpaceVim#layers#lang#markdown#plugins() abort
|
||||
call add(plugins, ['joker1007/vim-markdown-quote-syntax',{ 'on_ft' : 'markdown'}])
|
||||
call add(plugins, ['mzlogin/vim-markdown-toc',{ 'on_ft' : 'markdown'}])
|
||||
call add(plugins, ['iamcco/mathjax-support-for-mkdp',{ 'on_ft' : 'markdown'}])
|
||||
call add(plugins, ['lvht/tagbar-markdown',{'merged' : 0}])
|
||||
" check node package managers to ensure building of 2 plugins below
|
||||
if executable('npm')
|
||||
let s:node_pkgm = 'npm'
|
||||
elseif executable('yarn')
|
||||
let s:node_pkgm = 'yarn'
|
||||
else
|
||||
let s:node_pkgm = ''
|
||||
call SpaceVim#logger#error('npm or yarn is required to build iamcco/markdown-preview and neoclide/vim-node-rpc')
|
||||
endif
|
||||
call add(plugins, ['iamcco/markdown-preview.nvim',
|
||||
\ { 'on_ft' : 'markdown',
|
||||
\ 'depends': 'open-browser.vim',
|
||||
\ 'build' : 'cd app & yarn install' }])
|
||||
call add(plugins, ['lvht/tagbar-markdown',{'merged' : 0}])
|
||||
\ 'build' : 'cd app & ' . s:node_pkgm . ' install' }])
|
||||
if !has('nvim')
|
||||
call add(plugins, ['neoclide/vim-node-rpc', {'merged': 0, 'build' : 'yarn install'}])
|
||||
call add(plugins, ['neoclide/vim-node-rpc', {'merged': 0, 'build' : s:node_pkgm . ' install'}])
|
||||
endif
|
||||
return plugins
|
||||
endfunction
|
||||
|
Loading…
Reference in New Issue
Block a user