aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/provider/node.vim
diff options
context:
space:
mode:
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 ''