forked from mirrors/nixpkgs
47 lines
2.2 KiB
Diff
47 lines
2.2 KiB
Diff
diff --git a/autoload/health/mkdp.vim b/autoload/health/mkdp.vim
|
|
index 9eebb56..0700333 100644
|
|
--- a/autoload/health/mkdp.vim
|
|
+++ b/autoload/health/mkdp.vim
|
|
@@ -9,8 +9,8 @@ function! health#mkdp#check() abort
|
|
call health#report_info('Pre build: ' . l:mkdp_server_script)
|
|
call health#report_info('Pre build version: ' . mkdp#util#pre_build_version())
|
|
call health#report_ok('Using pre build')
|
|
- elseif executable('node')
|
|
- call health#report_info('Node version: ' . system('node --version'))
|
|
+ else
|
|
+ call health#report_info('Node version: ' . system('@node@ --version'))
|
|
let l:mkdp_server_script = s:mkdp_root_dir . '/app/server.js'
|
|
call health#report_info('Script: ' . l:mkdp_server_script)
|
|
call health#report_info('Script exists: ' . filereadable(l:mkdp_server_script))
|
|
diff --git a/autoload/mkdp/nvim/rpc.vim b/autoload/mkdp/nvim/rpc.vim
|
|
index 5abd807..db1067b 100644
|
|
--- a/autoload/mkdp/nvim/rpc.vim
|
|
+++ b/autoload/mkdp/nvim/rpc.vim
|
|
@@ -53,8 +53,8 @@ function! mkdp#nvim#rpc#get_command() abort
|
|
let l:pre_build = s:root_dir . '/app/bin/markdown-preview-' . mkdp#util#get_platform()
|
|
if executable(l:pre_build)
|
|
let l:cmd = [l:pre_build, '--path', s:script]
|
|
- elseif executable('node')
|
|
- let l:cmd = ['node', s:root_dir . '/app/index.js', '--path', s:script]
|
|
+ else
|
|
+ let l:cmd = ['@node@', s:root_dir . '/app/index.js', '--path', s:script]
|
|
endif
|
|
if !exists('l:cmd')
|
|
echohl Error | echon '[vim-node-rpc] pre build and node not found!' | echohl None
|
|
diff --git a/autoload/mkdp/rpc.vim b/autoload/mkdp/rpc.vim
|
|
index a3361ec..d42f7a6 100644
|
|
--- a/autoload/mkdp/rpc.vim
|
|
+++ b/autoload/mkdp/rpc.vim
|
|
@@ -59,9 +59,9 @@ function! mkdp#rpc#start_server() abort
|
|
let l:mkdp_server_script = s:mkdp_root_dir . '/app/bin/markdown-preview-' . mkdp#util#get_platform()
|
|
if executable(l:mkdp_server_script)
|
|
let l:cmd = [l:mkdp_server_script, '--path', s:mkdp_root_dir . '/app/server.js']
|
|
- elseif executable('node')
|
|
+ else
|
|
let l:mkdp_server_script = s:mkdp_root_dir . '/app/index.js'
|
|
- let l:cmd = ['node', l:mkdp_server_script, '--path', s:mkdp_root_dir . '/app/server.js']
|
|
+ let l:cmd = ['@node@', l:mkdp_server_script, '--path', s:mkdp_root_dir . '/app/server.js']
|
|
endif
|
|
if exists('l:cmd')
|
|
if s:is_vim
|