aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/provider/node.vim
diff options
context:
space:
mode:
authorchemzqm <chemzqm@gmail.com>2018-03-14 16:32:19 +0800
committerJustin M. Keyes <justinkz@gmail.com>2018-03-15 04:55:48 +0100
commit338664e96c9b0fd00cfe2c1312fa40219301379d (patch)
tree7052228ec423a2d9dc84f6c290969f92290d7d19 /runtime/autoload/provider/node.vim
parent5ce8158a5d462043306ee67a3261794f169bdb17 (diff)
downloadrneovim-338664e96c9b0fd00cfe2c1312fa40219301379d.tar.gz
rneovim-338664e96c9b0fd00cfe2c1312fa40219301379d.tar.bz2
rneovim-338664e96c9b0fd00cfe2c1312fa40219301379d.zip
node/provider: support g:node_host_prog #8135
Diffstat (limited to 'runtime/autoload/provider/node.vim')
-rw-r--r--runtime/autoload/provider/node.vim3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/autoload/provider/node.vim b/runtime/autoload/provider/node.vim
index ae6f84de72..39b5dc63b8 100644
--- a/runtime/autoload/provider/node.vim
+++ b/runtime/autoload/provider/node.vim
@@ -38,6 +38,9 @@ function! provider#node#can_inspect() abort
endfunction
function! provider#node#Detect() abort
+ if exists('g:node_host_prog')
+ return g:node_host_prog
+ endif
let global_modules = get(split(system('npm root -g'), "\n"), 0, '')
if v:shell_error || !isdirectory(global_modules)
return ''